Skip to content

rule type syntax #91

@tmteam

Description

@tmteam
a: rule(int,int):int = rule ...

# if we want to migrate to fun

a: fun(int, int):int = fun it1+it2

# can be named

a: fun(a:int, b:int):int = fun(a,b) a+b

# can be without any specification
a: fun = fun it1+it2

to discuss


# can be without type specification
#candidate 1:
a: fun( , ) = fun it1+it2
#candidate 2:
a: fun(*,*):* = fun it1+i2
#candidate 3:
a: fun(..,..):.. = fun it1+it2
#candidate 4:
a: fun(val,val):val = fun it1+it2
# it is the same problem as we have in map
a: map(*,int) = ...
# can be solved as kiss operator

a:* = 42

# can use generic types. How to specify constrains
a: fun[of T,V](T, V):V

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions