prosyslab-classroom / cs348-information-security

61 stars 10 forks source link

[Question] OCaml related. #215

Closed anisrashidov closed 1 year ago

anisrashidov commented 1 year ago

image

What does " 'a " indicate in the highlighted part?

m-spitfire commented 1 year ago

It's a type variable, it means any type 'a, it's kind of equivalent of generics in other languages, but type 'a doesn't have any restrictions on it, it just means "any type", See Polymorphic Functions

anisrashidov commented 1 year ago

It's a type variable, it means any type 'a, it's kind of equivalent of generics in other languages, but type 'a doesn't have any restrictions on it, it just means "any type", See Polymorphic Functions

Thank you