File: partial-application1.fut

package info (click to toggle)
haskell-futhark 0.25.27-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 17,836 kB
  • sloc: haskell: 99,384; ansic: 12,821; python: 3,394; yacc: 783; javascript: 558; sh: 550; lisp: 395; makefile: 263
file content (10 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
-- Binding a function to a local variable before applying it.
-- ==
-- input { 3 } output { 6 }
-- input { 11 } output { 22 }

def f (x : i32) : i32 = x + x

def main (x : i32) =
  let g = f
  in g x