package yocaml
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Core engine of the YOCaml Static Site Generator
Install
dune-project
Dependency
Authors
Maintainers
Sources
yocaml-2.4.0.tbz
sha256=5d230b9dd9e3d434ebb767ecc20732ed8fc03a8c100813ff29c7933a7ee4050d
sha512=b4f4b76bef7e4d65d2f7434c122592a02c5d80114bde58f2167509fc92e2666a6b798ca964b9ed07e526ef2b59c5db9c4a435c6c64721a745ea0da37b3eed97a
doc/yocaml/Yocaml/Data/Validation/Syntax/index.html
Module Validation.SyntaxSource
Binding operators are used to link fields together to build a complete validation.
A typical usage is:
record (fun assoc ->
let+ field_a = required assoc "fieldA" validator_a
and+ field_b = optional assoc "fieldB" validator_b
and+ field_c = required associ "fieldB" validator_c in
{ field_a, field_b, field_c })let+ x = v in k x is map (fun x -> k x) v.
let+ x = v and+ y = w in k x y is map2 (fun x y -> k x y) v w.
let* r = f x in return r tries to produce a result Ok from the expression f x, if the expression returns Error _, the computation chain is interrupted.
Warning: the semantics of let* are significantly different from a succession of let+ ... and+ ... which allow errors to be collected in parallel (independently), whereas let* captures them sequentially. The composition of let* and let+ is tricky and let* should only be used to validate preconditions.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>