Skip to content

Instantly share code, notes, and snippets.

Created April 14, 2013 22:35
Show Gist options
  • Save anonymous/5384519 to your computer and use it in GitHub Desktop.
Save anonymous/5384519 to your computer and use it in GitHub Desktop.
Intro to LFE REPL
$ ./bin/lfe -pa ./ebin
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [kernel-poll:false]
LFE Shell V5.9.1 (abort with ^G)
> (+ 1 2)
3
>
> (: io format '"Here are some atoms: ~p ~p~n" (iist 'data1 'data2))
Here are some atoms: data1 data2
ok
>
> (set exp
(lambda (x y)
(trunc (: math pow x y))))
#Fun<lfe_eval.15.53503600>
> (funcall exp 2 1)
2
> (funcall exp 2 2)
4
> (funcall exp 2 3)
8
> (funcall exp 2 4)
16
> (funcall exp 2 5)
32
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment