math - Is there a strongly typed programming language which allows you to define new operators? -
I am currently looking for a programming language to write a math class. I know that there are so many and there are lots of places around them, but since I am going to start studying mathematics in the next session, I thought that this is one of the things I have learned about the deep information Good way can be.
Thank you for your reply.
BTW: If you're wondering what I want to ask:
"Is there a strong typing programming language that allows you to define new operators?"
, Haskell makes it very easy:
% ghci ghci & gt; let's do a * - * b = (a * a) - (b * b) ghci & gt; : Type (* - *) (* - *) :: (number) = & gt; A - & gt; A - & gt; A GSC & gt; 4 * - * 3 7 gci & gt; 1.2 * - * 0.9 0.6299999999999999 GCA & gt; (* - *) 5 3 16Gci & gt; : { Give to GCD A One & gt; B = GCD (A - B) B | B & gt; A = GCD A (B - A) | Otherwise = a :} ghci & gt; : Type GCD GCD :: (Ord A, Number A) = & gt; A - & gt; A - & gt; A GSC & gt; GCD3-6 3GCI & gt; GCD12 11 1GCI & gt; You can define new infix operators (only symbols) by using an infix syntax. You can use them as an Infix Operator, or you can add them to the feet to use them as a normal work.You can also use normal tasks (letters, numbers, underscores, and single-quote) as backers in backlit.
Comments
Post a Comment