N Best Programming Techniques
From Compsci.ca Wiki
(Difference between revisions)
m (→Erlang) |
(→Erlang) |
||
| Line 24: | Line 24: | ||
<pre>-module(example). | <pre>-module(example). | ||
-export(hello/1]). | -export(hello/1]). | ||
| - | |||
hello("wtd") -> | hello("wtd") -> | ||
Revision as of 04:15, 9 July 2006
Ten best programming techniques you're (probably) not using.
Contents |
Pattern matching
Common Lisp (destructuring-bind)
Erlang
-module(example).
-export(hello/1]).
hello("wtd") ->
io:format("Hello, ~s!~n", [Name]);
hello(Name) ->
io:format("Get out!!~n", []).