HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Keyword arguments

Categories: Idioms

"We show the Haskell implementation of keyword arguments, which goes well beyond records (e.g., in permitting the re-use of labels). Keyword arguments indeed look just like regular, positional arguments. However, keyword arguments may appear in any order. Furthermore, one may associate defaults with some keywords; the corresponding arguments may then be omitted. It is a type error to omit a required keyword argument. The latter property is in stark contrast with the conventional way of emulating keyword arguments via records."

Genuine keyword arguments

Retrieved from "http://www.haskell.org/haskellwiki/Keyword_arguments"

This page has been accessed 1,391 times. This page was last modified 11:55, 10 April 2006. Recent content is available under a simple permissive license.