¾Æ·Ð

¸ÚÁø ±â´É ±¸¼º
Áö±Ý ´Ù¿î·Îµå

¾Æ·Ð ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Other/Proprietary Li...
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Brian Hicks
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • https://github.com/BrianHicks/

¾Æ·Ð ű×


¾Æ·Ð ¼³¸í

µ¥ÇÁ add_one (N ) : ¾Æ·ÐÀº ÆÄÀ̽㠱â´É composition.How?Let's ¿¡ ¸î °¡Áö ¹®¹ý ¼³ÅÁ À» Ãß°¡ÇÏ´Â ÆÄÀ̽㠸ðµâ À» »ç¿ëÇÏ¸é ´ÙÀ½°ú °°Àº ±â´É ÀÌ ÀÖ´Ù°í °¡Á¤ ÀÔ´Ï´Ù ¼öÀÍÀ» N + 1def ´õºí ( N) : ¹Ýȯ N * 2def ints_less_than ( N) : ¹Ýȯ ¹üÀ§ (1, n) def Á¦Ç° (* ns) : °á°ú = ns in ns : °á°ú * = n ¹Ýȯ °á°ú ´ÙÀ½°ú °°ÀÌ ÇÒ ¼ö ÀÖ½À´Ï´Ù : def two_n_plus_one (n) : return add_one (double (n)) def product_of_lesser_numbers (n) : ¹Ýȯ Á¦Ç° (* ints_less_than (n)) ¶Ç´Â ÄÄÇø®½º·Î ±â´ÉÀ» Àå½ÄÇÏ°í, two_n_plus_one = double> add_oneproduct_of_lesser_numbers = ints_less_than >> productyou Áö±Ý±îÁö ¾Ë¾Æ ³ÂÀ» °ÍÀÔ´Ï´Ù. >´Â ±¸¼ºÀ̸ç >> °á°ú´Â °á°ú¸¦ ´ÙÀ½ ±â´ÉÀ¸·Î Ç¥½ÃÇÕ´Ï´Ù. Á¦Ç°ÀÇ È¨ÆäÀÌÁö


¾Æ·Ð °ü·Ã ¼ÒÇÁÆ®¿þ¾î