Add documentation

This commit is contained in:
Kiana Sheibani 2022-06-25 00:58:36 -04:00
parent 11d771b926
commit 59af31cdd7
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
10 changed files with 188 additions and 37 deletions

View file

@ -15,10 +15,12 @@ Scalar : Type -> Type
Scalar = Array []
||| Convert a value to a scalar.
export
scalar : a -> Scalar a
scalar x = fromVect _ [x]
||| Unwrap the single value from a scalar.
export
unwrap : Scalar a -> a
unwrap = index 0 . getPrim