Skip to content

Add foreign implementation for push #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add foreign implementation for push
  • Loading branch information
i-am-the-slime authored Jun 13, 2023
commit 3b5c6d2638ea8d9c4d6c1dc54ce823aba62bcaeb
8 changes: 8 additions & 0 deletions src/Data/Array/ST.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,11 @@ export const toAssocArrayImpl = function (xs) {
for (var i = 0; i < n; i++) as[i] = { value: xs[i], index: i };
return as;
};

export const push = function (a) {
return function (xs) {
return function () {
return xs.push(a);
};
};
};