quox/lib/Quox/SingletonExtra.idr
2024-05-27 21:29:37 +02:00

11 lines
225 B
Idris

module Quox.SingletonExtra
import public Data.Singleton
public export
map : (f : a -> b) -> Singleton x -> Singleton (f x)
map f x = [|f x|]
public export
(<$>) : (f : a -> b) -> Singleton x -> Singleton (f x)
(<$>) = map