codeworld-base-0.2.0.0: Replacement base module for CodeWorld

Safe HaskellNone
LanguageHaskell98

Extras.Op

Description

An experimental module with a collection of composition and application operators in different flavors.

Synopsis

Documentation

(<$>) :: (a -> b) -> [a] -> [b] infixr 1 #

Applicative operator, used to apply a function to all the elements of a list

(<?>) :: (a -> Truth) -> [a] -> [a] infixr 1 #

Selective operator, used to keep only those elements in the given list that satisfy the given condition

(<|>) :: (a -> Truth) -> (a -> Truth) -> a -> Truth infixl 2 #

A predicate that is True whenever one of its arguments is True

(<&>) :: (a -> Truth) -> (a -> Truth) -> a -> Truth infixl 3 #

A predicate that is True whenever both of its arguments are True

(.>) :: (a -> b) -> (b -> c) -> a -> c infixl 9 #

Function composition, where data flows from left to right

(.<) :: (b -> c) -> (a -> b) -> a -> c infixr 9 #

Function composition, where data flows from right to left

(.$) :: a -> (a -> b) -> b infixl 8 #

Simulates object notation by allowing you to write x.$method instead of method(x)

(.#) :: [a] -> (a -> b) -> [b] infixl 8 #

Object notation for the applicative operator

(.?) :: [a] -> (a -> Truth) -> [a] infixl 8 #

Object notation for the selective operator

($>) :: a -> (a -> b) -> b infixl 2 #

Alternative syntax for function application, which indicates direction of data flow (left to right) and has low precedence

(=:) :: a -> b -> (a, b) infixl 2 #

Operator notation to create a pair, so that a =: b is (a,b)