Last active
March 12, 2023 14:21
-
-
Save bgoetzmann/6b2acedade9ad4b04aaefdb72bc78a67 to your computer and use it in GitHub Desktop.
Used in this article: https://medium.com/@bgoetzmann/modèle-de-conception-commande-en-langage-groovy-9bea26b47d6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def makeAddItemCommand(Cart cart, Item item) { | |
{ -> cart.addItem(item) } | |
} | |
def makeRemoveItemCommand(Cart cart, Item item) { | |
{ -> cart.removeItem(item) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment