Package hydra.dsl.prims
Interface Maybes
public interface Maybes
DSL interface providing Maybe/Optional primitive operations for working with optional values.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Termapply()Returns a term representing the apply primitive operation for maybes.static Termbind()Returns a term representing the bind primitive operation for maybes.static Termmap()Returns a term representing the map primitive operation for maybes.static Termpure()Returns a term representing the pure primitive operation for maybes.
-
Method Details
-
apply
Returns a term representing the apply primitive operation for maybes.- Returns:
- a term for applying a function in a maybe context
-
bind
Returns a term representing the bind primitive operation for maybes.- Returns:
- a term for monadic bind in a maybe context
-
map
Returns a term representing the map primitive operation for maybes.- Returns:
- a term for mapping a function over a maybe value
-
pure
Returns a term representing the pure primitive operation for maybes.- Returns:
- a term for lifting a value into a maybe context
-