RosettaCodeData/Task/Function-definition/Lasso/function-definition-3.lasso

7 lines
255 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
// Signatures that convert second input to match first input
define multiply(a::integer,b::any) => #a * integer(#b)
define multiply(a::decimal,b::any) => #a * decimal(#b)
// Catch all signature
define multiply(a::any,b::any) => decimal(#a) * decimal(#b)