Skip to content

Samples? #233

Description

@antkmsft

Can there be a samples directory with an .md file on how to run them? ("run npm install, run npm run build")?

I think, the following samples could be beneficial:

  1. "99 bottles of beer". Calls itself recursively starting from 99, special casing 1.
  2. "sort numbers" - an equivalent of the following Haskell code:
quickSort []     = []
quickSort (x:xs) = quickSort (filter (<x) xs)
                   ++ [x] ++
                   quickSort (filter (>=x) xs)
  1. Consume a FunctionalScript function from "existing" TypeScript project
  2. Consume a FunctionalScript function from "existing" JavaScript project
  3. Probably, "Hello World" (just to cover another classic example)
  4. A parser? (where functional languages are strong). Could be a URL or DateTime parser.
  5. Expression calculator (+, -, /, %, (), maybe pi constant, log2(), sin(), cos() etc) - the stuff similar to what a typical hardware calculator has.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions