Skip to content

Instantly share code, notes, and snippets.

@foxbunny
Created November 28, 2016 14:43
Show Gist options
  • Save foxbunny/c9a908cf8be90dfc5e15aeb20dbe5405 to your computer and use it in GitHub Desktop.
Save foxbunny/c9a908cf8be90dfc5e15aeb20dbe5405 to your computer and use it in GitHub Desktop.
// updateSearchPct :: s -> s -> s
export const updateSearchPct = match(ADD_FLIGHTS,
state => R.assoc('searchPct',
Math.round(state.tickets.length / state.searchTotal) * 100, state))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment