This file contains hidden or 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
| (* SIMPLE FUNCTIONS OVER INTEGERS *) | |
| let multiple_of n d = | |
| n mod d = 0;; | |
| let integer_square_root n = | |
| int_of_float (sqrt (float n));; | |
| (* PRIME NUMBERS *) | |
| let rec gcd n m = | |
| match (n, m) with |
This file contains hidden or 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
| module Query = [%graphql | |
| {| | |
| query { | |
| someFieldWithInterfaceType { | |
| id | |
| ...on ImplA { | |
| a_only | |
| } | |
| ...on ImplB { | |
| b_only |
A Pen by Anonasaurus Rex on CodePen.
NewerOlder