Skip to content

Instantly share code, notes, and snippets.

@deepakmehra10
Created July 14, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepakmehra10/7afb9b3523aa4e98c6f1b28aea4938d2 to your computer and use it in GitHub Desktop.
Save deepakmehra10/7afb9b3523aa4e98c6f1b28aea4938d2 to your computer and use it in GitHub Desktop.
//memoization
Function2<Integer,Integer,Integer> multiply = (a,b) -> (a *b);
Function2<Integer, Integer, Integer> memoized = multiply.memoized();
Integer value = memoized.apply(2, 3);
System.out.println(value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment