spavikevik / stereo

Yet another (hobby) programming language
GNU General Public License v3.0
0 stars 0 forks source link

Restrict parametric polymorphism #12

Closed spavikevik closed 10 months ago

spavikevik commented 10 months ago

This PR adds generics (type parameters) and restricts parametric polymorphism. Thus,

fn identity(x: a) -> a { x }

is now invalid and should be written as

fn identity<x>(x: a) -> a { x }