Hacker News new | ask | show | jobs
by trealira 683 days ago
Or like Standard ML.

But it's interesting, since I hadn't seen that part yet, only the loop part and some of the dynamic typing.

  for List:
    each i: [1, 2]
    each j: ["a", "b", "c"]
    [i, j]

  > [[1, "a"], [1, "b"], [1, "c"], [2, "a"], [2, "b"], [2, "c"]]

  for (i: 1..4):
    "number " +& i
    ~into List

  > ["number 1", "number 2", "number 3"]

  for:
    each:
      friend: ["Alice", "Bob", "Carol"]
      index: 1..4
    println(index +& ". " +& friend)
  1. Alice
  2. Bob
  3. Carol
It gave me the impression of more of a cross between Scheme and Python.
1 comments

Yes, I also got Python vibes. That behind said, I'm digging infix less and less over time, and I'm actually starting to crave forth syntax, just got the complete lack of punctuation...

but, I actually really like what they have going here. Seems nice and minimalist, while meeting consistent and clean.