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 -> b) -> [a] -> [b] infixr 1 #

Alternative syntax for the applicative operator, which indicates direction of data flow (right to left)

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

Alternative syntax for the applicative operator, which indicates direction of data flow (left to right)

(<?>) :: (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 -> (a -> b) -> b infixl 1 #

Reverses the order of function application, so that the argument is first and the function is second

(<|) :: (a -> b) -> a -> b infixr 1 #

Makes function application explicit, so f <| x is the same as f(x)

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

Function composition, where data flows from left to right

(.<) :: (b -> c) -> (a -> b) -> a -> c infixl 1 #

Function composition, where data flows from right to left

(⇐) :: (a -> b) -> a -> b infixr 1 #

Unicode version of the function application operator (flowing right to left)

(⇒) :: a -> (a -> b) -> b infixl 1 #

Unicode version of the function application operator (flowing left to right)

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

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

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

Object notation for the applicative operator

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

Object notation for the selective operator