Anoma abstract resource machine - 0.0.0

Apps.Sudoku.Serializer

Definitions

encode : Grid -> ByteStringSource#

Encode a Sudoku Grid to a ByteString

floorSquareRoot : Nat -> NatSource#

Compute the largest Nat that is less than or equal to the input Nat.

checkSquareRoot {{Partial}} (n : Nat) : NatSource#

Partial function that computes a square root. If the input Nat is not a square number then fail.

decode {{Partial}} (bs : ByteString) : GridSource#

Decode a Sudoku Grid from a ByteString

filledSquares (proposal : ByteString) : NatSource#

Count the number of filled squares in a serialized Grid

emptySquares (proposal : ByteString) : NatSource#

Count the number of unfilled squares in a serialized Grid