Skip to content

Instantly share code, notes, and snippets.

@ravinggenius
Created May 15, 2014 02:20
Show Gist options
  • Save ravinggenius/f40776dbffa1e2dfc773 to your computer and use it in GitHub Desktop.
Save ravinggenius/f40776dbffa1e2dfc773 to your computer and use it in GitHub Desktop.
First Rip REPL session
$ ./bin/rip repl
Welcome to Rip
Type "help" for help, "exit" to quit
[1] module> add = -> (a, b) { a + b }
=> #< #< System.Lambda > [ bind, class ] keyword = ->, arity = 2 >
[2] module> add5 = add(5)
=> #< #< System.Lambda > [ bind, class ] keyword = ->, arity = 1 >
[3] module> add5(6)
=> #< #< System.Integer > [ %, *, +, -, /, class ] data = 11 >
[4] module> add(3, 42)
=> #< #< System.Integer > [ %, *, +, -, /, class ] data = 45 >
[5] module> help
This should be a helpful message
[6] module> add
=> #< #< System.Lambda > [ bind, class ] keyword = ->, arity = 2 >
[7] module> add(42, 1)
=> #< #< System.Integer > [ %, *, +, -, /, class ] data = 43 >
[8] module> add()(2)()(4)
=> #< #< System.Integer > [ %, *, +, -, /, class ] data = 6 >
[9] module> exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment