, , Just, ! Haskell , , foo Just x = x - . :
Prelude> let foo Just x = x
<interactive>:2:9:
Constructor βJustβ should have 1 argument, but has been given none
In the pattern: Just
In an equation for βfooβ: foo Just x = x
, :
Prelude> data Justice = Just
Prelude> let foo Just x = x
Prelude> :t foo
foo :: Justice -> t -> t
Prelude> foo Just ()
()
Just ( ), - -, Just x , " " " . (, , Nothing, .)