fork(2) download
  1. Interval extend [
  2. generality [ ^ 300 ]
  3. coerce: aNumber [ ^ Array new: self size withAll: aNumber ]
  4. ]
  5.  
  6. Array extend [
  7. + other [ ^ self with: other collect: [:x :y | x + y] ]
  8. squared [ ^ self collect: [:x | x * x] ]
  9. sum [ ^ self inject: 0 into: [:acc :x | acc + x] ]
  10. ]
  11.  
  12. (6 + (1 to: 12)) squared sum displayNl
Success #stdin #stdout 0.01s 7384KB
stdin
Standard input is empty
stdout
2018