From cdd831fb8c7961e621237927a7727c591eb8a64c Mon Sep 17 00:00:00 2001 From: Peter Mrekaj Date: Sun, 25 Oct 2015 15:56:38 -0700 Subject: [PATCH] Fix typos --- recursion/powerset.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recursion/powerset.go b/recursion/powerset.go index 0e422ee..88324dd 100644 --- a/recursion/powerset.go +++ b/recursion/powerset.go @@ -18,10 +18,10 @@ func PowerSet(s []interface{}) (ps []interface{}, ok bool) { for x > 0 { lsb := x & -x // x & -x is same as x & ^(x - 1). - // Compute index of x's least significant bit. + // Compute the index of x's least significant bit. i := 0 p := 1 - for lsb&p == 0 { // lsb mast be greater then 0, which is always true 'cause x > 0. + for lsb&p == 0 { // lsb must always be greater then 0, which is always true 'cause x > 0. p <<= 1 i++ }