Created
May 23, 2019 22:27
-
-
Save jeremycochoy/a2aa1a8d20bfa9ff62beb7e24ddb0443 to your computer and use it in GitHub Desktop.
This file contains 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
/// Map a function to the tracks | |
func map<R>(f: (T) -> R) -> ListZipper<R> { | |
var zipper = ListZipper<R>() | |
zipper.leftList = leftList.map(f) | |
zipper.cursor = cursor.map(f) | |
zipper.rightList = rightList.map(f) | |
return zipper | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment