Giter Club home page Giter Club logo

mers's Introduction

mers

See the mers readme for more info.


"Hello, World!".println

Hello, World!


my_var := "Hello, Variable!"
my_var.println

Hello, Variable!


(1, 2, 3, 4).sum.println

10


(1, "2", 3, 4).sum.println

err1


(1, 2, 3, 4).as_list.debug

List<Int> :: [1, 2, 3, 4]


(1.0, 2.0).as_list.debug

List<Float> :: [1, 2]


(1, 2, 3.5).as_list.debug

List<Int/Float> :: [1, 2, 3.5]


int_list := (1, 2, 3).as_list
float_list := (4.5, 6.0).as_list
int_list.chain(float_list).as_list.debug

List<Int/Float> :: [1, 2, 3, 4.5, 6]

mers's People

Contributors

dummi26 avatar

Stargazers

Andrew Johnson avatar

Watchers

 avatar

mers's Issues

custom types/errors

func := path -> {
  // read the file, parse its contents as (json/xml/...),
  // or return an error if the file is invalid
  "invalid file contents!" // <- this is just a string, not an error
}

Also types would be convenient to give names to big data structures since stacked tuples are hard to read

destructuring assignments ignore references on tuples

As expected, destructuring a tuple of references gives two references:

x := 10
y := 12
[a, b] := [&x, &y]
a.debug() // &int
b.debug() // &int

However, destructuring the reference to a tuple does not:

x := 10
y := 12
z := [x, y]
[a, b] := &z
a.debug() // int :: &int :: &10
b.debug() // int :: &int :: &12

The type checker seems to miss the reference entirely, even though it works as expected at runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.