SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Program structure in Lisp
overview Forms Variables Macros Function calls Named functions Lambda expressions Top-level forms Declaring global variables and named constants Control of time and evaluation
forms Forms are the standard units of iteration in CL implementation. A form is simply a data object meant to be evaluated as a program to produce one or more values. Meaning full forms may be further divided into: ,[object Object]
Symbols(variables)
ListsLists can further be divided as: special forms, macro calls and function calls. All characters, numbers, string, and bit-vectors are all self-evaluating forms. When such an object is evaluated, that object is returned as the value of the form.
Variables Symbols are used as the names for the variables in CL programs. When a symbol is evaluated as the form, the value of the variable it names is produced. Ex: (setq w 8)produces 8 Types of variables: ,[object Object]
Special (dynamic),[object Object]
It is recommended that the program-analyzing program process a form that is a list whose car is a symbol as follows: ,[object Object]
If the macro-function is true of the symbol, apply either macro-expand or macroexpand-1, as appropriate to the entire form and then start over.
Otherwise, assume it as a function call.,[object Object]
Function calls While the list is being evaluated as a form, if the first element is not a symbol that names a special form or a macro, the it is considered as a function call. The first element of the list is taken as the name of the function. All the remaining elements of the list are evaluated and one value is obtained from each form, and these values become the arguments to the function. Whatever values the function returns becomes the values of the function-call forms.
Function calls continued.. Ex: (+ 3 (* 1 2)) here, + is not a special form or macro. So 3 and (* 1 2) are considered as arguments of the function call, again 1 2 are taken as arguments of the function call (* 1 2) and the value 2 is returned. The values 2 and 3 are given as arguments for the addition function to produce the result 5.  Thus, ( + 3 (* 1 2))5
Functions Two ways to indicate the function as the function-call form are: ,[object Object]
 using a lambda-expression whose first element in the list is lambda.Lambda expressions or the symbols when used in programs as the name of the functions, can appear only as the first element of the function-call form, or the second element of the function special form. A global name can be given to a function using the defun construct. A local name is given to the function using the flet or labels construct.
Lambda-expressions A lambda-expression has the following syntax: (lambda lambda-list .body) The first element must be lambda, the second element must be the list, and specifies names for the parameters of the list The body may consists of zero or more number of forms. Each element in the lambda-list is either a parameter specifier or the lambda-list keyword. (lambda-list keywords begin with &) Var or svar must be a symbol( the name of the variable), Each keyword must be a keyword symbol, such as :start
A lambda-list has five parts Specifiers for the required parameters: these are parameter specifiers up to the first lambda-list keyword. Specifiers for the optional parameters: these are the specifiers  following the lambda-list keyword &optional up to the next lambda-list keyword or the end of the list. A specifier for a rest parameter Specifiers for the keyword parameters Specifiers for the aux parameters: If the lambda-list keyword &key is present, all specifiers after it are auxiliary variable specifiers.
Top-level forms The standard way to interact with CL implementation is via a read-eval-print loop. The system reads a form from the same input source, evaluates it and then prints the value to the output sink. Top-level special forms are used: ,[object Object]
Define macros
Make declarations
Define global values for special variablesIf progn appears at top-level, then all forms within that progn are considered by the compiler to be top-level forms.

Weitere Àhnliche Inhalte

Was ist angesagt?

Csc1100 lecture04 ch04
Csc1100 lecture04 ch04Csc1100 lecture04 ch04
Csc1100 lecture04 ch04IIUM
 
Programming with Lambda Expressions in Java
Programming with Lambda Expressions in Java Programming with Lambda Expressions in Java
Programming with Lambda Expressions in Java langer4711
 
Matlab m files and scripts
Matlab m files and scriptsMatlab m files and scripts
Matlab m files and scriptsAmeen San
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsNewCircle Training
 
Anonymous and Inline Functions in MATLAB
Anonymous and Inline Functions in MATLABAnonymous and Inline Functions in MATLAB
Anonymous and Inline Functions in MATLABShameer Ahmed Koya
 
Programming in java - Concepts- Operators- Control statements-Expressions
Programming in java - Concepts- Operators- Control statements-ExpressionsProgramming in java - Concepts- Operators- Control statements-Expressions
Programming in java - Concepts- Operators- Control statements-ExpressionsLovelitJose
 
C++ rajan
C++ rajanC++ rajan
C++ rajanDeep Rajan
 
C++ tokens and expressions
C++ tokens and expressionsC++ tokens and expressions
C++ tokens and expressionsNabeelaNousheen
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4Shameer Ahmed Koya
 
Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentationVan Huong
 
Csc1100 lecture06 ch06_pt1
Csc1100 lecture06 ch06_pt1Csc1100 lecture06 ch06_pt1
Csc1100 lecture06 ch06_pt1IIUM
 
What's new in java 8
What's new in java 8What's new in java 8
What's new in java 8Dian Aditya
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersMurshida ck
 

Was ist angesagt? (20)

Some basic FP concepts
Some basic FP conceptsSome basic FP concepts
Some basic FP concepts
 
Csc1100 lecture04 ch04
Csc1100 lecture04 ch04Csc1100 lecture04 ch04
Csc1100 lecture04 ch04
 
C intro
C introC intro
C intro
 
Programming with Lambda Expressions in Java
Programming with Lambda Expressions in Java Programming with Lambda Expressions in Java
Programming with Lambda Expressions in Java
 
Matlab m files and scripts
Matlab m files and scriptsMatlab m files and scripts
Matlab m files and scripts
 
Java 8
Java 8Java 8
Java 8
 
Scala qq
Scala qqScala qq
Scala qq
 
Java 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & StreamsJava 8 Lambda Expressions & Streams
Java 8 Lambda Expressions & Streams
 
Anonymous and Inline Functions in MATLAB
Anonymous and Inline Functions in MATLABAnonymous and Inline Functions in MATLAB
Anonymous and Inline Functions in MATLAB
 
Programming in java - Concepts- Operators- Control statements-Expressions
Programming in java - Concepts- Operators- Control statements-ExpressionsProgramming in java - Concepts- Operators- Control statements-Expressions
Programming in java - Concepts- Operators- Control statements-Expressions
 
C++ rajan
C++ rajanC++ rajan
C++ rajan
 
C++ tokens and expressions
C++ tokens and expressionsC++ tokens and expressions
C++ tokens and expressions
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4
 
Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentation
 
Csc1100 lecture06 ch06_pt1
Csc1100 lecture06 ch06_pt1Csc1100 lecture06 ch06_pt1
Csc1100 lecture06 ch06_pt1
 
C programming session5
C programming  session5C programming  session5
C programming session5
 
What's new in java 8
What's new in java 8What's new in java 8
What's new in java 8
 
Java8
Java8Java8
Java8
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
 

Andere mochten auch

LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lispDataminingTools Inc
 
A brief introduction to lisp language
A brief introduction to lisp languageA brief introduction to lisp language
A brief introduction to lisp languageDavid Gu
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lispkyleburton
 
Gentle Introduction To Lisp
Gentle Introduction To LispGentle Introduction To Lisp
Gentle Introduction To LispDamien Garaud
 
LISP Programming Language (Artificial Intelligence)
LISP Programming Language (Artificial Intelligence)LISP Programming Language (Artificial Intelligence)
LISP Programming Language (Artificial Intelligence)wahab khan
 
Lisp Programming Languge
Lisp Programming LangugeLisp Programming Languge
Lisp Programming LangugeYaser Jaradeh
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lispfukamachi
 
Learn a language : LISP
Learn a language : LISPLearn a language : LISP
Learn a language : LISPDevnology
 
Expert systems
Expert systemsExpert systems
Expert systemsJithin Zcs
 
Application of expert system
Application of expert systemApplication of expert system
Application of expert systemDinkar DP
 
Introduction and architecture of expert system
Introduction  and architecture of expert systemIntroduction  and architecture of expert system
Introduction and architecture of expert systempremdeshmane
 
Art, Culture, and Technology
Art, Culture, and TechnologyArt, Culture, and Technology
Art, Culture, and TechnologyTVWS, LLC
 
Quick Look At Classification
Quick Look At ClassificationQuick Look At Classification
Quick Look At ClassificationDataminingTools Inc
 
Txomin Hartz Txikia
Txomin Hartz TxikiaTxomin Hartz Txikia
Txomin Hartz Txikiairantzugoitia86
 
Oratoria E RetĂłRica Latinas
Oratoria E RetĂłRica LatinasOratoria E RetĂłRica Latinas
Oratoria E RetĂłRica Latinaslara
 
PresentaciĂłN De Quimica
PresentaciĂłN De QuimicaPresentaciĂłN De Quimica
PresentaciĂłN De Quimicaguestf6a53c
 
Facebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning SystemFacebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning SystemChen Luo
 

Andere mochten auch (20)

LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
A brief introduction to lisp language
A brief introduction to lisp languageA brief introduction to lisp language
A brief introduction to lisp language
 
Lisp
LispLisp
Lisp
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lisp
 
Gentle Introduction To Lisp
Gentle Introduction To LispGentle Introduction To Lisp
Gentle Introduction To Lisp
 
Lisp
LispLisp
Lisp
 
LISP Programming Language (Artificial Intelligence)
LISP Programming Language (Artificial Intelligence)LISP Programming Language (Artificial Intelligence)
LISP Programming Language (Artificial Intelligence)
 
Lisp Programming Languge
Lisp Programming LangugeLisp Programming Languge
Lisp Programming Languge
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lisp
 
Learn a language : LISP
Learn a language : LISPLearn a language : LISP
Learn a language : LISP
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Application of expert system
Application of expert systemApplication of expert system
Application of expert system
 
Introduction and architecture of expert system
Introduction  and architecture of expert systemIntroduction  and architecture of expert system
Introduction and architecture of expert system
 
Prolog & lisp
Prolog & lispProlog & lisp
Prolog & lisp
 
Art, Culture, and Technology
Art, Culture, and TechnologyArt, Culture, and Technology
Art, Culture, and Technology
 
Quick Look At Classification
Quick Look At ClassificationQuick Look At Classification
Quick Look At Classification
 
Txomin Hartz Txikia
Txomin Hartz TxikiaTxomin Hartz Txikia
Txomin Hartz Txikia
 
Oratoria E RetĂłRica Latinas
Oratoria E RetĂłRica LatinasOratoria E RetĂłRica Latinas
Oratoria E RetĂłRica Latinas
 
PresentaciĂłN De Quimica
PresentaciĂłN De QuimicaPresentaciĂłN De Quimica
PresentaciĂłN De Quimica
 
Facebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning SystemFacebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning System
 

Ähnlich wie LISP:Program structure in lisp

LISP: Macros in lisp
LISP: Macros in lispLISP: Macros in lisp
LISP: Macros in lispLISP Content
 
Functions in C++
Functions in C++Functions in C++
Functions in C++home
 
Functions in C++
Functions in C++Functions in C++
Functions in C++home
 
User defined function in C.pptx
User defined function in C.pptxUser defined function in C.pptx
User defined function in C.pptxRhishav Poudyal
 
04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptxManas40552
 
1669958779195.pdf
1669958779195.pdf1669958779195.pdf
1669958779195.pdfvenud11
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming languageVasavi College of Engg
 
scala.reflect, Eugene Burmako
scala.reflect, Eugene Burmakoscala.reflect, Eugene Burmako
scala.reflect, Eugene BurmakoVasil Remeniuk
 
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»e-Legion
 
Function in C++
Function in C++Function in C++
Function in C++Prof Ansari
 
Programming style guideline very good
Programming style guideline very goodProgramming style guideline very good
Programming style guideline very goodDang Hop
 
imperative programming language, java, android
imperative programming language, java, androidimperative programming language, java, android
imperative programming language, java, androidi i
 

Ähnlich wie LISP:Program structure in lisp (20)

LISP: Macros in lisp
LISP: Macros in lispLISP: Macros in lisp
LISP: Macros in lisp
 
LISP: Macros in lisp
LISP: Macros in lispLISP: Macros in lisp
LISP: Macros in lisp
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
C language 3
C language 3C language 3
C language 3
 
User defined function in C.pptx
User defined function in C.pptxUser defined function in C.pptx
User defined function in C.pptx
 
User defined functions in matlab
User defined functions in  matlabUser defined functions in  matlab
User defined functions in matlab
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Functions
FunctionsFunctions
Functions
 
04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
 
1669958779195.pdf
1669958779195.pdf1669958779195.pdf
1669958779195.pdf
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
 
scala.reflect, Eugene Burmako
scala.reflect, Eugene Burmakoscala.reflect, Eugene Burmako
scala.reflect, Eugene Burmako
 
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»
ЕĐČĐłĐ”ĐœĐžĐč Đ‘ŃƒŃ€ĐŒĐ°ĐșĐŸ «scala.reflect»
 
final pl paper
final pl paperfinal pl paper
final pl paper
 
Function in C++
Function in C++Function in C++
Function in C++
 
FUNCTION CPU
FUNCTION CPUFUNCTION CPU
FUNCTION CPU
 
Programming style guideline very good
Programming style guideline very goodProgramming style guideline very good
Programming style guideline very good
 
Opps concept
Opps conceptOpps concept
Opps concept
 
imperative programming language, java, android
imperative programming language, java, androidimperative programming language, java, android
imperative programming language, java, android
 

Mehr von DataminingTools Inc

Terminology Machine Learning
Terminology Machine LearningTerminology Machine Learning
Terminology Machine LearningDataminingTools Inc
 
Techniques Machine Learning
Techniques Machine LearningTechniques Machine Learning
Techniques Machine LearningDataminingTools Inc
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning IntroductionDataminingTools Inc
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceDataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web miningDataminingTools Inc
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysisDataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataDataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsDataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technologyDataminingTools Inc
 
Data Mining: Data processing
Data Mining: Data processingData Mining: Data processing
Data Mining: Data processingDataminingTools Inc
 

Mehr von DataminingTools Inc (20)

Terminology Machine Learning
Terminology Machine LearningTerminology Machine Learning
Terminology Machine Learning
 
Techniques Machine Learning
Techniques Machine LearningTechniques Machine Learning
Techniques Machine Learning
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning Introduction
 
Areas of machine leanring
Areas of machine leanringAreas of machine leanring
Areas of machine leanring
 
AI: Planning and AI
AI: Planning and AIAI: Planning and AI
AI: Planning and AI
 
AI: Logic in AI 2
AI: Logic in AI 2AI: Logic in AI 2
AI: Logic in AI 2
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 
AI: Learning in AI 2
AI: Learning in AI 2AI: Learning in AI 2
AI: Learning in AI 2
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
 
AI: Belief Networks
AI: Belief NetworksAI: Belief Networks
AI: Belief Networks
 
AI: AI & Searching
AI: AI & SearchingAI: AI & Searching
AI: AI & Searching
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web mining
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technology
 
Data Mining: Data processing
Data Mining: Data processingData Mining: Data processing
Data Mining: Data processing
 

KĂŒrzlich hochgeladen

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...gurkirankumar98700
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

KĂŒrzlich hochgeladen (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

LISP:Program structure in lisp

  • 2. overview Forms Variables Macros Function calls Named functions Lambda expressions Top-level forms Declaring global variables and named constants Control of time and evaluation
  • 3.
  • 5. ListsLists can further be divided as: special forms, macro calls and function calls. All characters, numbers, string, and bit-vectors are all self-evaluating forms. When such an object is evaluated, that object is returned as the value of the form.
  • 6.
  • 7.
  • 8.
  • 9. If the macro-function is true of the symbol, apply either macro-expand or macroexpand-1, as appropriate to the entire form and then start over.
  • 10.
  • 11. Function calls While the list is being evaluated as a form, if the first element is not a symbol that names a special form or a macro, the it is considered as a function call. The first element of the list is taken as the name of the function. All the remaining elements of the list are evaluated and one value is obtained from each form, and these values become the arguments to the function. Whatever values the function returns becomes the values of the function-call forms.
  • 12. Function calls continued.. Ex: (+ 3 (* 1 2)) here, + is not a special form or macro. So 3 and (* 1 2) are considered as arguments of the function call, again 1 2 are taken as arguments of the function call (* 1 2) and the value 2 is returned. The values 2 and 3 are given as arguments for the addition function to produce the result 5. Thus, ( + 3 (* 1 2))5
  • 13.
  • 14. using a lambda-expression whose first element in the list is lambda.Lambda expressions or the symbols when used in programs as the name of the functions, can appear only as the first element of the function-call form, or the second element of the function special form. A global name can be given to a function using the defun construct. A local name is given to the function using the flet or labels construct.
  • 15. Lambda-expressions A lambda-expression has the following syntax: (lambda lambda-list .body) The first element must be lambda, the second element must be the list, and specifies names for the parameters of the list The body may consists of zero or more number of forms. Each element in the lambda-list is either a parameter specifier or the lambda-list keyword. (lambda-list keywords begin with &) Var or svar must be a symbol( the name of the variable), Each keyword must be a keyword symbol, such as :start
  • 16. A lambda-list has five parts Specifiers for the required parameters: these are parameter specifiers up to the first lambda-list keyword. Specifiers for the optional parameters: these are the specifiers following the lambda-list keyword &optional up to the next lambda-list keyword or the end of the list. A specifier for a rest parameter Specifiers for the keyword parameters Specifiers for the aux parameters: If the lambda-list keyword &key is present, all specifiers after it are auxiliary variable specifiers.
  • 17.
  • 20. Define global values for special variablesIf progn appears at top-level, then all forms within that progn are considered by the compiler to be top-level forms.
  • 21. Defining named functions defun special form is used for defining named functions. evaluating the defun form causes the symbol name to be a global name for the function specified by the lambda-expression. (defun (setf cadr)
) is used to define a setf expansion function to cadr. Forms constitute the body of the defined function, they are executed as an implicit progn. defun name lambda-list [[ {declaration}* | doc-string]] {form}*
  • 22.
  • 24. defconstant (used for defining named constants)Syntax: defvar name [initial-value [documentation]] defparameter name initial-value [documentation] defconstant name initial-value [documentation]
  • 25. (defvar variable) proclaims the variable to be special. defvar also gives a good option to provide the comment for the variable Ex: (defvar *visible-windows* 0 “number of visual windows at least partially visible on the screen”) defparameter is similar to defvar, but it requires an initial value-form, always evaluates the form, and assigns the result to the variable. defconstant is like defparameter but does assert that the value of the variable name is fixed and does license the compiler to build assumptions about the value into program being compiled.
  • 26. Control of time and execution The eval-when special code allows pieces of code to be executed only at compile-time, only at load time, or when interrupted but not compiled. eval-when ({situation}*) {from}* The body of the eval-when form is processed as an implicit progn only if the situation is a symbol, either compile, eval or load. Eval specifies that the interpreter should process the body. Compile specifies that the compiler should evaluate the body at compile time. Load specifies that the compiler should arrange to evaluate the forms in the body when the compiled file containing the eval-when form is loaded.
  • 27.
  • 28. if the situation compile is specified, or if the current processing mode is compile-time-too and the situation eval is specified, the process each of the forms in the body in compile-time-too mode.
  • 29. else, process each of the forms in the body in not-compile-time mode
  • 30. if the situation load is not specified:
  • 31. if the situation compile is specified, or if the current processing mode is compile-time-too and the situation eval is specified, then evaluate each of the forms in the body in the compiler’s executing environment.
  • 32.
  • 33. Visit more self help tutorials Pick a tutorial of your choice and browse through it at your own pace. The tutorials section is free, self-guiding and will not involve any additional support. Visit us at www.dataminingtools.net