Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```haskell
- V<0∫mo`^_1c
- ```
- ```haskell
- -- implicit last parameter (⁰ variable)
- c -- get char code
- _1c -- literal -1
- ^_1c -- raise to the power of
- `^_1c -- invert the arguments for ^
- o`^_1c -- compose the functions together (map only takes one function)
- ∫mo`^_1c -- get the cumulative sum
- V<0∫mo`^_1c -- find the first index where the element is less than 0 (husk is 1 indexed)
- ```
- [Try it online!][TIO-kwsivkh5]
- [TIO-kwsivkh5]: https://tio.run/##yygtzv6f@6ip8dC2/2E2Bo86VufmJ8TFGyb///9fQ1NDU1NDA0gAAYjk0uTSgABNTAAA "Husk – Try It Online"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement