Created
May 27, 2020 14:24
-
-
Save athas/0ce077d4d05c665370561eb42986e66a to your computer and use it in GitHub Desktop.
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
| let hist2 [n] 'a (k: i32) (op: a -> a -> a) (ne: a) (is: [n](i32, i32)) (vs: [n](a,a)) : [k]a = | |
| let x = reduce_by_index (replicate k ne) op ne (map (.0) is) (map (.0) vs) | |
| let y = reduce_by_index (replicate k ne) op ne (map (.1) is) (map (.1) vs) | |
| in map2 op x y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment