Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
0 people like it. Like the snippet!
brute force pattern building for an array tail
1: 2: 3: 4: 5: 6: 7:
let nums = [|1;2;3|] let initial = [|1;2|] let pattern = Array.concat [initial ;Array.sub nums (Array.length initial) ((Array.length nums) - (Array.length initial)) ] match nums with pattern -> "bingo"