source/euler41.rb
def pandigitals 
    (1..self).to_a.permutation.map do |permutation|
      permutation.map(&:to_s).join("").to_i
    end
  end
# Made on the theory that they'd be faster to generate than to check
Made on the theory that they'd be faster to generate than to check
Made on the theory that they ' d be faster to generate than to check
def pandigitals 
    (1..self).to_a.permutation.map do |permutation|
      permutation.map(&:to_s).join("").to_i
    end
  end
def pandigitals ( 1 .. self ) . to_a . permutation . map do | permutation | permutation . map ( & :to_s ) . join ( "" ) . to_i end end
Made on the theory that they'd be faster to generate than to check
Made on the theory that they ' d be faster to generate than to check