Skip to content

Instantly share code, notes, and snippets.

@oubiwann
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save oubiwann/29bc3398f2be3cef76e5 to your computer and use it in GitHub Desktop.

Select an option

Save oubiwann/29bc3398f2be3cef76e5 to your computer and use it in GitHub Desktop.
Elixir from LFE
# update rebar.config to include Elixir
$ make get-deps
$ make compile
$ lfetool repl lfe -pa ./deps/elixir/lib/elixir/ebin/
> (Elixir.IO:puts \"hello\\nworld\")
hello
world
ok
> (set stream (Elixir.Stream:cycle '(1 2 3)))
#Fun<Elixir.Stream.15.23582569>
> (Elixir.Enum:take stream 10)
(1 2 3 1 2 3 1 2 3 1)
> (Elixir.Enum:take stream 20)
(1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment