You can use the subtract
function instead of -
if you want to right-section subtraction:
map (subtract 1) [1..5]
More Related Contents:
- Haskell function composition (.) and function application ($) idioms: correct use
- Apostrophe in identifiers in Haskell
- How to run a for loop in Haskell
- Getting started with Haskell
- Does Haskell have tail-recursive optimization?
- How is this fibonacci-function memoized?
- runST and function composition
- Explain this chunk of haskell code that outputs a stream of primes
- How to create a polyvariadic haskell function?
- What does (f .) . g mean in Haskell?
- foldl versus foldr behavior with infinite lists
- What is the purpose of Rank2Types?
- What are paramorphisms?
- Split a number into its digits with Haskell
- What is the difference between Int and Integer?
- Is Haskell truly pure (is any language that deals with input and output outside the system)?
- Euler 43 – is there a monad to help write this list comprehension?
- Using Maybe type in Haskell
- Is there a way to place some impure code inside pure functions?
- How to increment a variable in functional programming?
- What part of Hindley-Milner do you not understand?
- Why is GHC complaining about non-exhaustive patterns?
- foldl Implementation with Runtime Errors
- Exception handling in Haskell
- How to make a type with restrictions
- Given a Haskell type signature, is it possible to generate the code automatically?
- Haskell: Where vs. Let
- How does the ST monad work?
- An example of a Foldable which is not a Functor (or not Traversable)?
- Random number in Haskell [duplicate]