是否可以在给定的字符串长度上给出html5 datalist触发器?
<input list="tagLookup" id="tag" name="tag" type="text" placeholder="+ add custom tag" autocomplete=off triggerOn="3">
<datalist id="tagLookup">
<option value="aaaa">
<option value="bbbb">
<option value="cccc">
</datalist>
Run Code Online (Sandbox Code Playgroud)
想显示用户输入的3个字符的建议.
我是Scala的新手,我遇到了currying的问题,无法理解下面代码的答案是144.希望你们能在这里帮助我.
谢谢
def product (f: Int => Int)(a: Int, b: Int) : Int =
if(a>b) 1
else f(a) * product(f)(a + 1, b)
product(x => x * x)(3, 4) //answer = 144
Run Code Online (Sandbox Code Playgroud)