-
-
Save oubiwann/5384522 to your computer and use it in GitHub Desktop.
Intro to LFE REPL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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 | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> (: io format '"Here are some atoms: ~p ~p~n" (iist 'data1 'data2)) | |
Here are some atoms: data1 data2 | |
ok | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> (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