You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: YourDSL - Can you evaluate this S-expr?
Exercise 2: YourDSL - Can you evaluate this lazy S-expr?
Exercise 3: YourDSL - Will your eval produce closures?
Exercise 4: YourDSL - How to rewrite your function
Exercise 5: YourDSL - How to rewrite closures and primitives
Exercise 6: YourDSL - Can you represent a table as a fn?
Exercise 7: YourDSL - Is this S-Expr a lambda-expression?
Exercise 8: Can you change a function-table to a function?
Exercise 9: YourDSL - building fns by eval'ing an expr
Exercise 10: Can you completely rewrite lisp in your DSL?
Showing posts with label lisp thelittlelisper commonlisp. Show all posts
Showing posts with label lisp thelittlelisper commonlisp. Show all posts
Saturday, June 12, 2010
The Little LISPer - Chapter 9 - Lamdba The Ultimate
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1 - Can you rewrite your function to map it to a list?
Exercise 2 - ycombinator - Apply this fn to this pair in the list
Exercise 3 - Can you rewrite your function for the ycombinator?
Exercise 4 - Rewrite member for the ycombinator
Exercise 5 - Use a continuation function instead of an evaluator
Exercise 6 - Can you abstract these two functions into an accumulator?
Exercise 7 - Can you abstract accumulators into a single function?
Exercise 8 - Can you write your function as a thunk?
Exercise 9 - Can you combine an S-expr and a thunk to make a stream?
Exercise 10 - Can you use P and Q to build a stream?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1 - Can you rewrite your function to map it to a list?
Exercise 2 - ycombinator - Apply this fn to this pair in the list
Exercise 3 - Can you rewrite your function for the ycombinator?
Exercise 4 - Rewrite member for the ycombinator
Exercise 5 - Use a continuation function instead of an evaluator
Exercise 6 - Can you abstract these two functions into an accumulator?
Exercise 7 - Can you abstract accumulators into a single function?
Exercise 8 - Can you write your function as a thunk?
Exercise 9 - Can you combine an S-expr and a thunk to make a stream?
Exercise 10 - Can you use P and Q to build a stream?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 8 - Friends and Relations
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Expression evaluators - Is this an identity relation?
Exercise 2: Expression evaluators - Is this reflexive?
Exercise 3: Expression evaluators - Is this symmetric?
Exercise 4: Expression evalutors - What is value of f at x?
Exercise 5: Expression evaluators - Compose function f and g?
Exercise 6: Expression evalutors - Can you evaluate this relation?
Exercise 7: Expression evals - Is your relation of pairs prepped?
Exercise 8: Expression evals - Can you compose these relations?
Exercise 9: Expression evaluators - Is your expression transitive?
Exercise 10: Expression evals - Is your expression partial order?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Expression evaluators - Is this an identity relation?
Exercise 2: Expression evaluators - Is this reflexive?
Exercise 3: Expression evaluators - Is this symmetric?
Exercise 4: Expression evalutors - What is value of f at x?
Exercise 5: Expression evaluators - Compose function f and g?
Exercise 6: Expression evalutors - Can you evaluate this relation?
Exercise 7: Expression evals - Is your relation of pairs prepped?
Exercise 8: Expression evals - Can you compose these relations?
Exercise 9: Expression evaluators - Is your expression transitive?
Exercise 10: Expression evals - Is your expression partial order?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 7 - Shadows
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Starting writing your own arithmetic DSL in Lisp
Exercise 2: Validating an expression in your DSL
Exercise 3: Count the operators in your DSL
Exercise 4: Count the operands in your DSL
Exercise 5: Make your DSL expressions scalable
Exercise 6: Add binary operators to your expressions
Exercise 7: In your DSL check you have values for your expressions
Exercise 8: Get the variables passed into your expression DSL
Exercise 9: Evaluate your expression in your DSL
Exercise 10: Add binary operators into the evaluation of your DSL
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Starting writing your own arithmetic DSL in Lisp
Exercise 2: Validating an expression in your DSL
Exercise 3: Count the operators in your DSL
Exercise 4: Count the operands in your DSL
Exercise 5: Make your DSL expressions scalable
Exercise 6: Add binary operators to your expressions
Exercise 7: In your DSL check you have values for your expressions
Exercise 8: Get the variables passed into your expression DSL
Exercise 9: Evaluate your expression in your DSL
Exercise 10: Add binary operators into the evaluation of your DSL
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 6 - *Oh my Gawd*: It's Full of Stars
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Finding the hidden chili and separating them out
Exercise 2: Is there chili in the hot potatoes? (nested intersection)
Exercise 3: Double frying the baked tomatoes (nested atom duplication)
Exercise 4: LISP asking three questions about the fried potatoes
Exercise 5: Fish and chips - finding the first nested occurrence
Exercise 6: Adding the nested numbers
Exercise 7: What does this function g* do?
Exercise 8: What does this function f* do?
Exercise 9: Can we accumulate the potatoes in this dish?
Exercise 10: Can we accumulate the (nested) potatoes in this dish?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Finding the hidden chili and separating them out
Exercise 2: Is there chili in the hot potatoes? (nested intersection)
Exercise 3: Double frying the baked tomatoes (nested atom duplication)
Exercise 4: LISP asking three questions about the fried potatoes
Exercise 5: Fish and chips - finding the first nested occurrence
Exercise 6: Adding the nested numbers
Exercise 7: What does this function g* do?
Exercise 8: What does this function f* do?
Exercise 9: Can we accumulate the potatoes in this dish?
Exercise 10: Can we accumulate the (nested) potatoes in this dish?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 5 - The Multichapter Chapter
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Substituting the bananas for kiwis
Exercise 2: Substituting two things for kiwis
Exercise 3: Building a nests for the banana kiwi list (multidown)
Exercise 4: Counting the common ingredients (occurN)
Exercise 5: Finding the common ingredients
Exercise 6: Is this just one? Does it break the law(s)?
Exercise 7: Are these equal? Does it break the law?
Exercise 8: Broken count function - can you fix it?
Exercise 9: Curry chicken - How to de-nest this list
Exercise 10: Have we broken a law? Did we obey the spirit of the law?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1: Substituting the bananas for kiwis
Exercise 2: Substituting two things for kiwis
Exercise 3: Building a nests for the banana kiwi list (multidown)
Exercise 4: Counting the common ingredients (occurN)
Exercise 5: Finding the common ingredients
Exercise 6: Is this just one? Does it break the law(s)?
Exercise 7: Are these equal? Does it break the law?
Exercise 8: Broken count function - can you fix it?
Exercise 9: Curry chicken - How to de-nest this list
Exercise 10: Have we broken a law? Did we obey the spirit of the law?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 4 - Number Games
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. Duplicate that atom
Exercise 2. Multiply that list of numbers
Exercise 3. What is the fifth commandment?
Exercise 4. Is the list exponent function correct?
Exercise 5. What is the index of this atom in the list?
Exercise 6. What is the index of this atom in the list?
Exercise 7. What is the vector dot product of these two lists?
Exercise 8. Divide that list of numbers
Exercise 9. Telling LISP to find that remainder
Exercise 10. Less than or equal to?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. Duplicate that atom
Exercise 2. Multiply that list of numbers
Exercise 3. What is the fifth commandment?
Exercise 4. Is the list exponent function correct?
Exercise 5. What is the index of this atom in the list?
Exercise 6. What is the index of this atom in the list?
Exercise 7. What is the vector dot product of these two lists?
Exercise 8. Divide that list of numbers
Exercise 9. Telling LISP to find that remainder
Exercise 10. Less than or equal to?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 3 - Cons the Magnificent
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. Getting the spanish red beans out of a nested list
Exercise 2. Hot chili - List of duplicates function
Exercise 3. hot hot chili - duplicating an atom function
Exercise 4. hot sauce - substutition function
Exercise 5. and tomato sauce - multi substution function
Exercise 6. texas hot hot - list intersection substitution function
Exercise 7. Telling LISP to remove the sauce (atom)
Exercise 8. red wine - Is this a natural recursion?
Exercise 9. Removing the second chili (from this list)
Exercise 10. Are there some common ingredients in insert and subst?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. Getting the spanish red beans out of a nested list
Exercise 2. Hot chili - List of duplicates function
Exercise 3. hot hot chili - duplicating an atom function
Exercise 4. hot sauce - substutition function
Exercise 5. and tomato sauce - multi substution function
Exercise 6. texas hot hot - list intersection substitution function
Exercise 7. Telling LISP to remove the sauce (atom)
Exercise 8. red wine - Is this a natural recursion?
Exercise 9. Removing the second chili (from this list)
Exercise 10. Are there some common ingredients in insert and subst?
Labels:
lisp thelittlelisper commonlisp
The Little LISPer - Chapter 2 - Do It, Do It Again
You can go to the parent page here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. German chocolate cake - What is a List of AToms?
Exercise 2. (poppy seed cake) - How LISP know it’s a List of AToms?
Exercise 3. Is there coffee in this cake? Member of a list
Exercise 4. Changing the recipe (of the member? function)
Exercise 5. Is this (poppy seed cake) fake? LISP and fake LATs
Exercise 6. Is there cake in this list?
Exercise 7. Can we change the recipe of member? again?
Exercise 8. Did changing the recipe spoil the cake? (member? function)
Exercise 9. Is there cake in this red wine? (member? and nested lists)
Exercise 10. Did we put the chocolate in twice? (Dup. list members)
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Mattias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Exercise 1. German chocolate cake - What is a List of AToms?
Exercise 2. (poppy seed cake) - How LISP know it’s a List of AToms?
Exercise 3. Is there coffee in this cake? Member of a list
Exercise 4. Changing the recipe (of the member? function)
Exercise 5. Is this (poppy seed cake) fake? LISP and fake LATs
Exercise 6. Is there cake in this list?
Exercise 7. Can we change the recipe of member? again?
Exercise 8. Did changing the recipe spoil the cake? (member? function)
Exercise 9. Is there cake in this red wine? (member? and nested lists)
Exercise 10. Did we put the chocolate in twice? (Dup. list members)
Labels:
lisp thelittlelisper commonlisp
Sunday, June 6, 2010
The Little LISPer - Chapter 1 - Toys
You can learn more about the Little Lisper and this project here.
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Dan Friedman and Matthias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Question 1. First steps towards learning LISP - What distinguishes an atom?
Question 2. First steps towards learning LISP - What distinguishes a list?
Question 3. First steps towards Learning LISP - Cons a piece of cake onto your mouth
Question 4. Putting the french in french fries. (What is a list remainder?)
Question 5. Are two lisp's the same? When are atoms equal?
Question 6. What is the meaning of nothing? Can you have a null list?
Question 7. What if you add nothing to nothing? What about a null list?
Question 8. Meatballs and spaghetti. Is the end of a nested list an atom or null?
Question 9. Kiwis, mangoes, lemons . How do you traverse down a nested list?
Question 10. Peanut butter. How do I manually extract a particular atom from a list?
These are links to worked examples of The Little Lisper (3rd Edn.) in Common Lisp. They are being released in sequence, so not all are available now.
The assumption is that you have a copy or have read Dan Friedman and Matthias Felleison's The Little LISPer. (http://www.amazon.com/dp/0023397632/).
The questions are also available here (http://www.ccs.neu.edu/home/matthias/BTLS/exercises.ps)
Question 1. First steps towards learning LISP - What distinguishes an atom?
Question 2. First steps towards learning LISP - What distinguishes a list?
Question 3. First steps towards Learning LISP - Cons a piece of cake onto your mouth
Question 4. Putting the french in french fries. (What is a list remainder?)
Question 5. Are two lisp's the same? When are atoms equal?
Question 6. What is the meaning of nothing? Can you have a null list?
Question 7. What if you add nothing to nothing? What about a null list?
Question 8. Meatballs and spaghetti. Is the end of a nested list an atom or null?
Question 9. Kiwis, mangoes, lemons . How do you traverse down a nested list?
Question 10. Peanut butter. How do I manually extract a particular atom from a list?
Labels:
lisp thelittlelisper commonlisp
100 Days of The Little Lisper
What follows are chapters of The Little Lisper. Click one to see questions associated with it. These are being released in sequence, so not all are available immediately.
1. Toys
2. Do It, Do It Again
3. Cons the Magnificent
4. Number Games
5. Multichapter Chapter
6. Its Full of Stars
7. Shadows
8. Friends and Relations
9. Lamdba The Ultimate
10. What is the value of all this?
1. Toys
2. Do It, Do It Again
3. Cons the Magnificent
4. Number Games
5. Multichapter Chapter
6. Its Full of Stars
7. Shadows
8. Friends and Relations
9. Lamdba The Ultimate
10. What is the value of all this?
Labels:
lisp thelittlelisper commonlisp
Subscribe to:
Posts (Atom)