vapourlang / vapour

Typed superset of R
http://vapour.run
Apache License 2.0
162 stars 2 forks source link

Mix signature and type #36

Open JohnCoene opened 2 weeks ago

JohnCoene commented 2 weeks ago

Should it be allowed to mix signatures and types.

type math: func(x: int): int

func foo(callback: math | null): int {
  return 1
}

In foo callback can either be a variable or a function, and that just feels wrong, but there may be some odd cases where it may be useful.