clystar

functional facilites for crystal, inspired by clojure

clystar

Basic Functional routines for Crystal, inspired by Clojure

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      clystar:
        github: yvern/clystar
    
  2. Run shards install

Usage

require "clystar"
  • juxt macro (vararg): turns juxt T, f, g, h into ->(x : T){ f(x), g(x), h(x) }
  • pipe macro (vararg): turns pipe T, f, g, h into ->(x : T){ h(g(f(x))) }
  • >> operator (for Procs, binary forward composition): turns ->f(T) >> ->g(U) into ->(x : T){ g(f(x)) }

Development

  1. shards install
  2. crystal watch.cr
  3. add your new features!

Contributing

  1. Fork it (https://github.com/yvern/clystar/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • yvern - creator and maintainer
Repository

clystar

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • about 3 years ago
  • November 2, 2021
License

MIT License

Links
Synced at

Sun, 22 Dec 2024 23:44:25 GMT

Languages