jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

Add function type #1

Closed jmeaster30 closed 3 years ago

jmeaster30 commented 3 years ago

I want to be able to pass a function into another function and call it so we would need a function type

ideas: func<i32, i32 -> i32, i32> a function that takes two i32's as parameters and returns two i32's as output func<i32, i32 -> auto> a function that takes two i32's as parameters and returns whatever but it is determined at compile time func<auto -> auto> a function that takes whatever determined at compile time and returns whatever determined at compile time func<auto<T> -> T> a function that takes whatever determined at compile time and returns the same type

jmeaster30 commented 3 years ago

Done :)