Skip to content

Instantly share code, notes, and snippets.

@Jacoby6000
Last active December 17, 2017 02:23
Show Gist options
  • Select an option

  • Save Jacoby6000/06bfc2df9679fc248cd11d77e8824284 to your computer and use it in GitHub Desktop.

Select an option

Save Jacoby6000/06bfc2df9679fc248cd11d77e8824284 to your computer and use it in GitHub Desktop.
(uuid.successNel[CannotSaveSongError] |@|
section.lookupOneOf(songNameKeys).map(SongName(_)).toSuccess(MissingKey(songSection, songNameKeys)).toValidationNel |@|
section.lookupOneOf(artistKeys).map(Artist(_)).successNel |@|
section.lookupOneOf(albumKeys).map(Album(_)).successNel |@|
section.lookupOneOf(genreKeys).map(Genre(_)).successNel |@|
section.lookupOneOf(charterKeys).map(Charter(_)).successNel |@|
section.lookupOneOf(yearKeys).map(Year(_)).successNel |@|
now.successNel |@|
now.successNel)(Song.apply _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment