Proper formatting
This commit is contained in:
parent
2f77888365
commit
22458aa9e5
|
@ -573,11 +573,11 @@ module A = {
|
||||||
}
|
}
|
||||||
|
|
||||||
let getByWithFn = (a, fn, boolCondition) => {
|
let getByWithFn = (a, fn, boolCondition) => {
|
||||||
let i = ref(0);
|
let i = ref(0)
|
||||||
let finalFunctionValue = ref(None);
|
let finalFunctionValue = ref(None)
|
||||||
let length = Belt.Array.length(a);
|
let length = Belt.Array.length(a)
|
||||||
|
|
||||||
while (i.contents < length) && (finalFunctionValue.contents == None) {
|
while i.contents < length && finalFunctionValue.contents == None {
|
||||||
let itemWithFnApplied = Belt.Array.getUnsafe(a, i.contents) |> fn
|
let itemWithFnApplied = Belt.Array.getUnsafe(a, i.contents) |> fn
|
||||||
if boolCondition(itemWithFnApplied) {
|
if boolCondition(itemWithFnApplied) {
|
||||||
finalFunctionValue := Some(itemWithFnApplied)
|
finalFunctionValue := Some(itemWithFnApplied)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user