N Best Programming Techniques
From Compsci.ca Wiki
(Difference between revisions)
m |
m (→Erlang) |
||
| Line 22: | Line 22: | ||
==Common Lisp (destructuring-bind)== | ==Common Lisp (destructuring-bind)== | ||
==Erlang== | ==Erlang== | ||
| + | <pre>-module(example). | ||
| + | -export(hello/1]). | ||
| + | -import(io). | ||
| + | |||
| + | hello("wtd") -> | ||
| + | io:format("Hello, ~s!~n", [Name]); | ||
| + | |||
| + | hello(Name) -> | ||
| + | io:format("Get out!!~n", []).</pre> | ||
| + | |||
==Haskell== | ==Haskell== | ||
==O'Caml== | ==O'Caml== | ||
Revision as of 04:01, 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]).
-import(io).
hello("wtd") ->
io:format("Hello, ~s!~n", [Name]);
hello(Name) ->
io:format("Get out!!~n", []).