fix a typo in earlier commit, use seq_len instead of 1:fun(x)