Skip to content

Feat: Added Memoize Func#732

Merged
pomkarnath98 merged 4 commits intoTheAlgorithms:masterfrom
DmnChzl:feat/memoize-func
Oct 5, 2021
Merged

Feat: Added Memoize Func#732
pomkarnath98 merged 4 commits intoTheAlgorithms:masterfrom
DmnChzl:feat/memoize-func

Conversation

@DmnChzl
Copy link
Copy Markdown
Contributor

@DmnChzl DmnChzl commented Oct 4, 2021

Hello again 👋
I added the memo algorithm inside the cache folder (unit tests included)
If that's okay for you, can you add the hacktoberfest-accepted mention? 🙏

@DmnChzl DmnChzl requested a review from raklaptudirm as a code owner October 4, 2021 11:44
Cache/Memoize.js Outdated
*/
export const memoize = (func) => {
// eslint-disable-next-line no-console
console.log(`Creating cache for function '${func.name}'`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those console.log() are probably not crucial for the functionality, and don't look good when running tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While on the test subject. Where did you get the idea to name the directory __test__, when the rest is just test ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! You're right. I apply my own convention rather than yours... My apologize 🙏
I'm gonna fix it!

Copy link
Copy Markdown
Member

@raklaptudirm raklaptudirm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comments explaining what the algorithm does and how.

@pomkarnath98 pomkarnath98 added the hacktoberfest Created during hacktoberfest label Oct 5, 2021
@pomkarnath98 pomkarnath98 merged commit 0af6c0c into TheAlgorithms:master Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Created during hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants