Skip to content

Commit

Permalink
Reduce one dynamic access
Browse files Browse the repository at this point in the history
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
  • Loading branch information
chengluyu and LPTK authored Feb 22, 2025
1 parent 8be3383 commit 6e6c860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hkmc2/shared/src/test/mlscript-compile/Iter.mls
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fun getIterator(something) =
let prototype = Reflect.getPrototypeOf of something
prototype is null then "object"
else prototype.constructor.name
else something.(Symbol.iterator)()
else test.call(something)

fun adaptIterable(iterable, makeNext) = Iterable of () =>
let iterator = getIterator of iterable
Expand Down

0 comments on commit 6e6c860

Please sign in to comment.