Hacker News new | ask | show | jobs
by jbritton 1147 days ago

  > . f = | x -> y -> x \* y
What do these symbols mean “|” “\*”
1 comments

The `|` operator indicates that you're starting a function. And `*` is basic multiplication.

Scrapscript:

  | x -> y -> x * y
Javascript:

  x => y => x * y
It also works as a pattern-matching statement.

  | true  -> true  -> 2
  | true  -> false -> 1
  | false -> true  -> 1
  | false -> false -> 0