Generic maths
#1173
Replies: 1 comment
-
Hey, thanks for the question, however it's not a proper place for such questions, since not that many people are following this repo. You'll have better luck asking it on SO, slack or even official repository (dotnet/fsharp). If you, however, would like to make a suggestion for the language or the standard library, please use the official issue template instead. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Say there is a function that takes two number, in the function there is :
~ Operation that uses a constant programmer wrote in their favorite editor, for example
1
~ Comparison, Addition, Multiplication, Division etc with the parameter themselves
if param1 < param2 then ...
~ Mathematical operations between the parameter and the constant, for example
param1 <- param1 + 1
It would be nice that param1 doesn't get inferred to int when we are doing
param1 <- param1 + 1
because 1 is not a negative number and we can do this withfloat
int
uint
int64
...Edit :I've found helped in the
LanguagePrimitives
namespaceBeta Was this translation helpful? Give feedback.
All reactions