Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Lambda Lists Demo

Loading...

Sign in or sign up now!
2,854
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 4, 2008

Lambda Lists is a purely functional programming language that does not support functions nor variables. see http://cryptm.org/~sturm/files/ll.lisp for the source. (The original source was in Scheme and pretty badly coding. I rewrote it in Common Lisp)

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (SturmDarkblade)

  • Looks interesting... just one question: how does your language handle this?

    let (foo ?a) => (id 1)

    let (?a bar) => (id 2)

    (foo bar)

  • I gave it a bit of thought, but I couldn't think of any good way to hash them correctly. So I just go through the list of functions from the top to the bottom. So the one that is defined first will be the one that is evaluated.

  • Good fun! I am actually not sure this kind of "power" is useful or more useful than normal macros but it is fun to invent esolangs. I actually had a very similar idea to this with patterns rather than functions or variables. But my syntax was rather awkward:

    yours:let (foo ?a) = (bar ?a)

    mine:foo x1 means bar x1

    I was going for making a language that was essentially English, and grammatical. But it is impractical for when you pass a "function" another function the English becomes meaningless.

  • With pattern matching, one could easily define a crude english-like language. For example:

    let (if ?a then ?b else ?c) => (if ?a ?b ?c)

    or a 'english map' like:

    let (map the pattern ?a across the list ?b) => (map ?a ?b)

    To make the english make sense in a larger context, you could define specialized pattern such as:

    let (?a and then reverse) => (reverse ?a)

    So you could write stuff as:

    ((map the pattern double across the list (test scores)) and then reverse)

    Almost english ;-)

see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • Isn't this just a macro system?

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more