Skip to content
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

Table and Array functions sometimes expects the other type #1954

Open
2 tasks
Rathoz opened this issue Sep 26, 2022 · 0 comments
Open
2 tasks

Table and Array functions sometimes expects the other type #1954

Rathoz opened this issue Sep 26, 2022 · 0 comments

Comments

@Rathoz
Copy link
Collaborator

Rathoz commented Sep 26, 2022

  • Identify which functions should be moved
  • Identify which functions needs to be updated

function Table.randomize(tbl)

(#tbl & doesn't make sense on tables)

function Table.includes(tbl, value)

(uses ipairs)

function Table.filter(tbl, predicate, argument)

(doesn't give the key to function)

function Table.iter.forEach(tbl, lambda)

(ipairs)

function Table.iter.forEachIndexed(tbl, lambda)

(ipairs)

function Array.extractKeys(tbl)

Should be Table.keys (to follow common implementations, should be a Set also)

function Array.extractValues(tbl)

Should be Table.values

@Rathoz Rathoz changed the title Table and Array functions sometimes act expects the other type Table and Array functions sometimes expects the other type Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant