Haskell-like "Pattern Guards"

26 views
Skip to first unread message

George Ruethschilling

unread,
Nov 12, 2011, 9:09:27 AM11/12/11
to CAL Language Discussion
Hi,

does somebody know if CAL supports something similar to Haskell's
"pattern guards" ?

I am looking for a way to let data analysts define algebraic functions
by describing cases without too much syntactic sugar.

risk income
| 0 < income < 10000 -> "very high";
| 10000 < income < 20000 -> "high";
| 20000 < income < 30000 -> "moderate";

Has somebody experience with extending the CAL language?

Is it easily possible to hook in a preprocessor, to the gem cutter
code gem editor, that rewrites a dsl to CAL?

Best Regards
George
Reply all
Reply to author
Forward
0 new messages