Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lists #7

Open
mlajtos opened this issue Aug 28, 2018 · 0 comments
Open

Lists #7

mlajtos opened this issue Aug 28, 2018 · 0 comments

Comments

@mlajtos
Copy link
Owner

mlajtos commented Aug 28, 2018

Lists – ordered collection of any type

Lists will be implemented as arrays in JS. However, immutable.

Notation

  • [expr, expr]
    • no, because tensors are more important right now
  • (expr, expr)
    • weird, but nice
    • can be confusing
    • () will clash with None (doesn't have to)
      • can be empty list, but then these function calls can't be equivalent: fn!, fn()
        • there are functions that can take empty list as a "valid data": (Length () = 0) = (Length ! = !), (1,2,3) -> Map (v => v + 1), () -> Map fn, error: ! -> Map fn
    • (expr,) is single-element list
    • Python comma operator creates tuples
    • JS comma operator is a bad part, so can be altered
mlajtos added a commit that referenced this issue Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant