You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ãã¾ã«ã¯ãä»ã®äººã®å½¹ã«ç«ã¤è¨äºãæ¸ããã¨ãããã¨ã§æ¸ãã¦ã¿ãã ä¾ãã°ã以ä¸ã®ãããªmix-inã使ã£ãã³ã¼ããããã¨ãããããªãã¢ã«ãªä¾ã§ç¹ã«å¿ è¦ã«ãªããããªã³ã¼ãã§ã¯ãªãããã©ãã¾ã説æã®ããã®ã³ã¼ããªã®ã§è¨±ãã¦ã»ããã EnumerableMixinã¯map()ãæä¾ãã¦ãã¦ããã®map()ãä»ã®ã¡ã½ãã(å®ç¾©ããã¦ããªãããã©)ã¯ãeach()ã«ä¾åããã¨ããmix-inãããã¦Listã¯each()ãå®è£ ããã¯ã©ã¹ãä½ã®å¤å²ããªãmix-inã®ã³ã¼ãã class EnumerableMixin: def map(self, fn): return [fn(x) for x in self.each()] class List(EnumerableMixin): def __init__(self, xs): self.xs = xs def each(self): return
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}