|
Links to some example macros. If you've written a cool macro and want to share please add!
|
|
Links to some example macros. If you've written a cool macro and want to share please add!
|
|
|
|
|
|
* [haskell style do-notation](https://gist.github.com/3831514)
|
|
Note that these gists aren't necessarily kept up to date and might not work with the current version of sweet.js.
|
|
* [fragment of scheme](https://gist.github.com/3854258)
|
|
|
|
|
|
* [haskell style do-notation](https://gist.github.com/3831514) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230304))
|
|
|
|
* [fragment of scheme](https://gist.github.com/3854258) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230315))
|
|
* [var destructuring](https://gist.github.com/aaditmshah/7065183)
|
|
* [var destructuring](https://gist.github.com/aaditmshah/7065183)
|
|
* [parameter annotations](https://gist.github.com/3902112)
|
|
* [parameter annotations](https://gist.github.com/3902112)
|
|
* [coffeescript's `do` syntax](https://gist.github.com/4013740)
|
|
* [coffeescript's `do` syntax](https://gist.github.com/4013740) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230362))
|
|
* [chained comparisons](https://gist.github.com/4027626)
|
|
* [chained comparisons](https://gist.github.com/4027626)
|
|
* [rudimentary enum](https://gist.github.com/4065056)
|
|
* [rudimentary enum](https://gist.github.com/4065056) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230455))
|
|
* [y-combinator](https://gist.github.com/4133116)
|
|
* [y-combinator](https://gist.github.com/4133116) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230476))
|
|
* [repo with lots of examples](https://github.com/fabriceleal/SweetJsTests)
|
|
* [repo with lots of examples](https://github.com/fabriceleal/SweetJsTests)
|
|
* [null checking](https://gist.github.com/4165526)
|
|
* [null checking](https://gist.github.com/4165526) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230494))
|
|
* [hygienic destructuring using the coffeescript-style `$do` macro](https://gist.github.com/4554165)
|
|
* [hygienic destructuring using the coffeescript-style `$do` macro](https://gist.github.com/4554165) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230514))
|
|
* [contracts](https://github.com/oleiman/sweet-contracts)
|
|
* [contracts](https://github.com/oleiman/sweet-contracts)
|
|
* [case matching](https://gist.github.com/disnet/6024833)
|
|
* [case matching](https://gist.github.com/disnet/6024833)
|
|
* [cond (better switch)](https://gist.github.com/disnet/6024991)
|
|
* [cond (better switch)](https://gist.github.com/disnet/6024991)
|
... | | ... | |