返回顶部

收藏

Replace a set

更多
require 'set'

s = Set.new(1..3) # Initial set
s.replace(3..4)   # Replace all elements.  Argument is any enumerable

标签:Ruby,集合

收藏

0人收藏

支持

0

反对

0

»更多 您可能感兴趣的代码
  1. 2016-02-17 14:43:31Classify set elements as even or odd by Jamin
  2. 2016-08-28 12:09:13Inspect a set by 好好学习啊
  3. 2015-12-06 09:47:36to string by 好好学习啊
  4. 2015-12-30 10:38:27Set subtraction by 杨洋
  5. 2016-01-29 09:46:42Easing the Delegation Blues by 胡晋
  6. 2016-08-27 21:28:07include Comparable by 好好学习啊
  7. 2016-08-28 12:16:49Compare two sets by LeoSun
  8. 2016-02-22 20:29:27Create set with constant values by Loli控
  9. 2016-03-09 13:03:04Create Your tree by JustForFly
  10. 2016-08-27 21:39:08get Enumerable involved by LeoSun
  11. 2016-08-28 12:27:21Divide with block by jeffsui

发表评论