Features

Declo supports the following features:

  1. Arrow Functions

    x => x + 1
    
    compiles to Lambdas
    lambda x: x + 1
    

  2. Named Functions

    const foo = x => x + 1
    
    compiles to
    def foo(x):
        return x + 1
    

  3. Braced Scopes and Blocks

    const foo = x => {z = x + 1; y = z * 2; y}
    
    compiles to
    def foo(x):
        z = x + 1
        y = z * 2
        return y
    

  4. Map, Filter and Reduce

    [1, 2, 3].map(x => x + 1)
    
    compiles to
    list(map(lambda x: x + 1, [1, 2, 3]))
    

Note: We also accept any feature requests via Github Issues.