Git Product home page Git Product logo

jojo's Introduction

JoJo

Two level of compositions, one at function level, one at type level.

  • (x: T) -- local variable.
  • if a function return function, will the returned function be applied?
  • [ dup mul ] (square)
  • [ { x: 1, y: 2 } (obj) obj.x obj.y add ] (three)
  • [ (f) [ (x) x x f ] [ (x) x x f ] ] (Y)

List

@ty List [ Type - Type ]
@fn List [ (A) @datatype {
    null [ A List ]
    cons [ A - A List - A List ]
  }
]

@ty List.append [ A List - A List - A List ]
@fn List.append [ (y) @match {
    List.null [ y ]
    List.case [ (head) (tail) y tail List.append head List.cons ]
  }
]

@ty List.map [ [ A - B ] - A List - B List ]
@fn List.map [ (f) (x) x @match {
    List.null [ x ]
    List.cons [ (head) [f] List.map head f List.cons ]
  }
]

jojo's People

Contributors

xieyuheng avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.