@traversable/schema
    Preparing search index...

    Type Alias Json<T>

    Json: [T] extends [never] ? Json.Fixpoint : Json.Unary

    If T is not specified, defaults to the traditional definition of JSON as a recursive type.

    If T is provided, Json<T> resolves to the non-recursive definition of JSON.

    The non-recursive definition allows you to be more precise when you're applying a transformation to some JSON value one level at a time.

    This comes up when you're working with a traversal like the Visitor pattern, where you've separated your concerns:

    1. recursively "walking" the data structure
    2. applying a function at each node in the data structure

    This comes up a lot in the context of this library, which heavily exploits recursion schemes to "factor out" recursion.

    Recursion schemes are well-founded and well-known in the Haskell community, but the technique has not found its way into the industry yet.

    It is this library's explicit goal is to showcase how useful recursion schemes are, and how you can use them to write recursive programs that:

    1. are simple, almost trivial, to implement
    2. are easy to read and understand
    3. will, over time, help clarify and solidify your understanding of recursion in general

    Type Parameters

    • T = never