Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
function doMath( x: Float, y: Float, operation: Float -> Float -> Float ) {
return operation( x, y );
function swapDivide( swap: Bool, x: Float, y: Float ) {
return swap ? y / x : x / y;
doMath( 10, 2, function(x, y) { return swapDivide(true, x, y); } ); // returns 0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.