Funk

Small functional parts for TypeScript. Each result on this page comes from the real Funk source, which runs in your browser.

Fail a step and the value leaves the track

chain calls a step only on the Right track. After a failure, the later steps do not run: the Left value goes past them.

    One row of values, two answers

    The same tiles go into collect as an array and as a Set. Select a call and compare the two sides.

    Your row. Select a tile to remove it.
    Add a tile. The two ada tiles are equal, but they are two objects.
    The call

    collect([...])

    collect(new Set([...]))

    Feed the sponge until it is full

    sponge keeps each piece that you give it. When each pore has a value, it calls your function with all the pieces.

    host port db
    host
    port
    db
    Feed it

    Squeezed 0 times

      The state of a sponge is private. So each pore in the picture is a real sponge with one key, and it gets the same water.

      The small parts

      The page runs each example when it starts. Select a name to read its source.

      PartWhat it doesLive result

      Funk is not on npm. Its files are plain TypeScript with no dependencies. The specification tells the behavior of each part.