Created
January 28, 2018 19:34
-
-
Save neeraj9/0a33b9866bed98b775474e55111ae9c3 to your computer and use it in GitHub Desktop.
BeamParticle Java 8 Dynamic function for adding two numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!java | |
import com.ericsson.otp.erlang.OtpErlangObject; | |
import com.ericsson.otp.erlang.OtpErlangLong; | |
() -> new Object() { | |
public OtpErlangLong main(OtpErlangLong aLong, OtpErlangLong bLong) { | |
java.math.BigInteger a = aLong.bigIntegerValue(); | |
java.math.BigInteger b = bLong.bigIntegerValue(); | |
java.math.BigInteger result = a.add(b); | |
return new OtpErlangLong(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment