def size

bend-kit-http2@0.4.0.0 · huffman.bend:1149

import bend-kit-http2@0.4.0.0/huffman.bend as Huffman
import Base

1149def size(s: String, +total: U32) -> Maybe<&2, U32>:
1150  match s:
1151    case SNil{}:
1152      Some{total}
1153    case SCon{Chr{c}, t}:
1154      do Maybe<&2, U32>:
1155        n: U32 <- size.one(c, total)
1156        size(t, n)

Uses (6)

Used by (1)