Source/Packages

Component.PointwiseIdentity

packages/components/src/Component/PointwiseIdentity.alpha

95 lines5 declarations3.8 KiBSHA-256 7bf201c6e929

def · lines 45–64

pointwiseExpressionIdentity

Full file
45def pointwiseExpressionIdentity =
46  (lambda unrestricted slots : Nat .
47    (lambda unrestricted expression : (family PointwiseExpression StdU64 slots) .
48      (pointwiseFold
49        StdU64
50        Bytes
51        slots
52        (lambda unrestricted operation : (family PointwiseUnary) .
53          (lambda unrestricted child : Bytes .
54            (bytes-append b"u" (bytes-append (pointwiseUnaryIdentity operation) child))))
55        (lambda unrestricted operation : (family PointwiseBinary) .
56          (lambda unrestricted left : Bytes .
57            (lambda unrestricted right : Bytes .
58              (bytes-append
59                b"b"
60                (bytes-append (pointwiseBinaryIdentity operation) (bytes-append left right))))))
61        (lambda unrestricted bits : StdU64 . (bytes-append b"c" (dataBytesWord64LE bits)))
62        expression
63        (lambda unrestricted index : (family StdFin slots) .
64          (bytes-append b"i" (pointwiseIdentityWord (stdFinToNatural slots index)))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.