<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 14, 2014 at 1:49 PM, Roelof Wobben <span dir="ltr"><<a href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I have two beginners question.<br>
<br>
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 that.<br>
<br></blockquote><div><br></div><div>It gives you the answer, actually:</div><div> </div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:19.200000762939453px;text-align:justify;background-color:rgb(238,238,238)">[Head|Tail] = [a, b, c, d, e]</span><br>
</div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:19.200000762939453px;text-align:justify;background-color:rgb(238,238,238)"><br></span></div><div>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.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2) I like to use Sublimetext as a IDE. But how do I make a programm then run.<br>
<br></blockquote><div><br></div><div>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.</div>
<div><br></div></div>Suggested next resource: <a href="http://learnyousomeerlang.com">learnyousomeerlang.com</a><br clear="all"><div><br></div>-- <br>Sean Cribbs <<a href="mailto:sean@basho.com" target="_blank">sean@basho.com</a>><div>
Software Engineer</div><div>Basho Technologies, Inc.</div><div><a href="http://basho.com/" target="_blank">http://basho.com/</a></div>
</div></div>