Skip to content

Commit

Permalink
refactor: Array.reduce -> ramda reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgoldwastaken committed Oct 26, 2020
1 parent 5806d94 commit 3885ba9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers/pets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { anyPass, clone, filter, isEmpty, length, pipe } from 'ramda'
import { anyPass, clone, filter, isEmpty, length, pipe, reduce } from 'ramda'
import { validArrayIndex } from '../modules/arrayNumber'
import { filterInvalidStringOccurenceTuples } from '../modules/occurenceTuple'
import { arrayValueContainsString } from '../modules/stringArray'
Expand Down Expand Up @@ -90,8 +90,8 @@ const isPetName = (str: string) =>

export const petReducer: (
initial: PetData
) => (arr: string[]) => PetData = initial => arr =>
arr.reduce(
) => (arr: string[]) => PetData = initial =>
reduce(
(acc, curr) =>
returnFuncIfTrue(stringIsNumber(curr))(
parsePetAmount,
Expand Down

0 comments on commit 3885ba9

Please sign in to comment.