Logo
Explore Help
Register Sign In
zaphar/ucg
1
0
Fork 0
You've already forked ucg
mirror of https://github.com/zaphar/ucg.git synced 2025-07-21 18:10:42 -04:00
Code Issues Packages Projects Releases Wiki Activity
ucg/std/functional.ucg

17 lines
308 B
Plaintext
Raw Normal View History

FEATURE: Added some functional primitives to the stdlib.
2019-01-16 18:47:16 -06:00
let maybe = module{
val = NULL,
} => {
FEATURE: Macros are just an expression now. This is a breaking change for the map, filter, and reduce expressions but happily a forward compatible change for macros themselves.
2019-01-16 19:07:03 -06:00
let do = macro(op) => select (mod.val != NULL), NULL, {
true = op(mod.val),
FEATURE: Added some functional primitives to the stdlib.
2019-01-16 18:47:16 -06:00
};
};
let if = module{
test = false,
} => {
FEATURE: Macros are just an expression now. This is a breaking change for the map, filter, and reduce expressions but happily a forward compatible change for macros themselves.
2019-01-16 19:07:03 -06:00
let do = macro(op, arg) => select mod.test, arg, {
true = op(arg),
FEATURE: Added some functional primitives to the stdlib.
2019-01-16 18:47:16 -06:00
};
};
FEATURE: Macros are just an expression now. This is a breaking change for the map, filter, and reduce expressions but happily a forward compatible change for macros themselves.
2019-01-16 19:07:03 -06:00
let identity = macro(arg) => arg;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 107ms Template: 10ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API