Skip to content

Instantly share code, notes, and snippets.

@tilgovi
Created February 24, 2011 07:30
Show Gist options
  • Save tilgovi/841891 to your computer and use it in GitHub Desktop.
Save tilgovi/841891 to your computer and use it in GitHub Desktop.
coffee-script, traits.js, and monads
coffee> [{List, Just}, fs] = [(require './lib/monad'), (require 'fs')]
[object Object]
coffee> files = (List ['src', 'lib']).bind ((dir) -> Just (fs.readdirSync dir))
[object Object]
coffee> files.log()
23 Feb 23:28:40 - [ [ 'monad.coffee~', 'list.coffee~', 'skuld.coffee~', 'skuld.coffee', 'monad.coffee' ],
[ 'skuld.js', 'monad.js' ] ]
[object Object]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment