Newsgroups: fa.caml
From: Jeremy Yallop <jeremy.yal...@ed.ac.uk>
Date: Fri, 29 Jun 2007 14:21:24 UTC
Local: Fri, Jun 29 2007 10:21 am
Subject: [Caml-list] ANN: pattern guards
I'm pleased to announce the initial release of `patterns', an OCaml
extension providing general-purposes additions to pattern matching. This release includes a single feature: "pattern guards"; others will be made available in the near future. You can download patterns from http://code.google.com/p/ocaml-patterns/ Pattern guards generalize "when"-guards to allow arbitrary pattern match e with The expressions e1 ... en are evaluated in turn and matched with For example, given a function val lookup : 'a -> ('a * 'b) list -> 'b option you might write the following let f env = function instead of the less elegant and less efficient let f env = function Pattern guards and regular guards can be freely intermixed; for match e with Pattern guards were proposed (for Haskell) in Martin Erwig and Simon Peyton Jones See also: http://research.microsoft.com/~simonpj/Haskell/guards.html Jeremy. _______________________________________________ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||