Noogλe

search input

Function of the day

  • Trace the input and output of a function f named name, both down to depth.

    This is useful for adding around a function call, to see the before/after of values as they are transformed.

    Inputs

    depth

    1. Function argument

    name

    2. Function argument

    f

    3. Function argument

    v

    4. Function argument

    Type

    traceFnSeqN :: Int -> String -> (a -> b) -> a -> b
    

    Examples

    lib.debug.traceFnSeqN usage example

    traceFnSeqN 2 "id" (x: x) { a.b.c = 3; }
    trace: { fn = "id"; from = { a.b = {…}; }; to = { a.b = {…}; }; }
    => { a = { ... }; }