Use higher-order-functions instead of recursion

前端 未结 0 915
遥遥无期
遥遥无期 2020-12-01 20:36

i want to write an function f, which converts a binary list to an integer, like:

f :: [Integer] -> Integer
f [] = 0
f list = (last list) * 2^(length list -         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题