Skip to content

Instantly share code, notes, and snippets.

@nwillc
Last active December 29, 2021 02:37
Show Gist options
  • Save nwillc/f8c3378e789685edcf83ad3e0444405b to your computer and use it in GitHub Desktop.
Save nwillc/f8c3378e789685edcf83ad3e0444405b to your computer and use it in GitHub Desktop.
hasData genfuncs.Predicate[string] = func(l string) bool { return len(l) > 2 }
toRuneSlice genfuncs.Function[string, []rune] = func(s string) []rune { return []rune(s) }
toPixel genfuncs.Function[rune, bool] = func(r rune) bool { return r == blackPixel }
toPixelSlice genfuncs.Function[[]rune, []bool] = func(rs []rune) []bool { return genfuncs.Map(rs, toPixel) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment