From 653755f4d0c75415c06c05e26006ee1c88e8df25 Mon Sep 17 00:00:00 2001 From: Jay Gandhi Date: Sat, 2 Dec 2017 05:59:58 +0530 Subject: [PATCH] added deal which has multiple return --- go_stephen_grider/code/03_cards_deck/deck.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go_stephen_grider/code/03_cards_deck/deck.go b/go_stephen_grider/code/03_cards_deck/deck.go index 853edef..05cd5d1 100644 --- a/go_stephen_grider/code/03_cards_deck/deck.go +++ b/go_stephen_grider/code/03_cards_deck/deck.go @@ -29,3 +29,7 @@ func newDeck() deck { return cards } + +func deal(d deck, handSize int) (deck, deck) { + return d[:handSize], d[handSize:] +}