Unit In Haskell

[Solved] Unit In Haskell | Haskell - Code Explorer | yomemimo.com
Question : unit in haskell

Answered by : renz-carillo

-- () or unit is similar to None in python, this is used if no type is decided, think of this as "any" from typescript
validateSplit :: SplitData -> () -> ScriptContext -> Bool
validateSplit SplitData{recipient1, recipient2, amount} _ ScriptContext{scriptContextTxInfo} -- we used _, this means it accepts any value

Source : | Last Update : Thu, 26 May 22

Answers related to unit in haskell

Code Explorer Popular Question For Haskell