[erlang-questions] two beginners questions
Mon Apr 14 23:03:52 CEST 2014
On Mon, Apr 14, 2014 at 1:49 PM, Roelof Wobben <> wrote:
> I have two beginners question.
> 1) I start learning by the tryerlang site. And I did succeed in the list
> part. But the last question is to display the HEAD and TAIL. How do I do
It gives you the answer, actually:
[Head|Tail] = [a, b, c, d, e]
Head is the head of the list and Tail is the tail, bound by the
pattern-matching statement. Alternatively, you can use the built-in
functions hd/1 and tl/1, e.g. if I have a list in the variable List,
hd(List) gives the head and tl(List) gives the tail.
2) I like to use Sublimetext as a IDE. But how do I make a programm then
When you have compiled, either manually via erlc or with a build tool, run
"erl" and call the function in the module you want to run. Nothing
IDE-specific there, sorry.
Suggested next resource: learnyousomeerlang.com
Sean Cribbs <>
Basho Technologies, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions