def decode.simple

bend-kit-cbor@0.3.0.0 · cbor.bend:415

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base

415def decode.simple(+ai: U32) -> Maybe<&1, Val>:
416  match ai:
417    case 20:
418      Some{Sim{SFalse{}}}
419    case 21:
420      Some{Sim{STrue{}}}
421    case 22:
422      Some{Sim{SNull{}}}
423    case 23:
424      Some{Sim{SUndefined{}}}
425    case _:
426      decode.other(U32.is_lt(ai, 20), ai)

Uses (9)

Used by (1)