nim_iterator_stream_experiment/monad/predicate

Types

Predicate[T] = Reader[T, bool]
  Source Edit

Procs

proc test[T](self: Predicate[T]; value: T): bool
  Source Edit

Funcs

func `not`[T](self: Predicate[T]): Predicate[T]
  Source Edit
func `and`[T](self, then: Predicate[T]): Predicate[T]
The returned predicate will use the short circuiting and.   Source Edit
func `or`[T](self, `else`: Predicate[T]): Predicate[T]
The returned predicate will use the short circuiting or.   Source Edit
func ifElse[A; B](self: Predicate[A]; then, `else`: A -> B): Reader[A, B]
  Source Edit
func alwaysFalse[T](_: T): bool
  Source Edit
func alwaysTrue[T](_: T): bool
  Source Edit