$hash{$_} = 1 for @{foo()};