首页 \ 问答 \ 为什么我们在scheme中使用嵌套的lambdas?(Why do we use nested lambdas in scheme?)

为什么我们在scheme中使用嵌套的lambdas?(Why do we use nested lambdas in scheme?)

我的作业中有几行代码:

(define square-a-procedure
(lambda (f) (lambda (x) (square (f x)))))

我不明白为什么我不能写这个

(define square-a-procedure (lambda (f x) (square (f x))))

我知道这是关于类型的,但我真的不明白为什么我们一个接一个地采取参数而不是一次性采取所有参数。


I have a few lines of code in my homework:

(define square-a-procedure
(lambda (f) (lambda (x) (square (f x)))))

I don't understand why I can't write this as

(define square-a-procedure (lambda (f x) (square (f x))))

I know it is about types but I don't really get why we take parameters one by one instead of taking all of them at once.


原文:https://stackoverflow.com/questions/40448330
更新时间:2024-03-02 10:03

最满意答案

尝试,

$(document).ready(function(e) {
    $("#header_inner .menu-header-container ul li").hover(function() {
        $(this).find("a").addClass('hover');
        $(this).closest(".sub-menu").slideToggle(50);
    });
});

Try,

$(document).ready(function(e) {
    $("#header_inner .menu-header-container ul li").hover(function() {
        $(this).find("a").addClass('hover');
        $(this).closest(".sub-menu").slideToggle(50);
    });
});

相关问答

更多
  • $('#myTab a').click(function (e) { e.preventDefault() $(this).tab('show'); var index = $(this).parent().index(); $('#myTab2 a:eq('+index+')').tab('show'); }) $('#myTab2 a').click(function (e) { e.preventDefault() $(this).tab('show'); var index = $( ...
  • 问题是你的元素ID从1 id =“tab1-lower”开始,然后在每个()函数内你使用x参数,它是从0开始的索引。只需添加一个名为index的额外变量,它将在每个内部递增x ()函数 请看这里的小提琴http://jsfiddle.net/MyPNz/2/ // do this for each of the tabbed/folder links $("a.tab-link-lower").each(function(x){ var index = x + 1; ...
  • 在这种情况下,不要使用mouseleave处理程序,在mouseenter中从其他元素中删除悬停的类 var myMenu = $('.menu li'); myMenu.mouseenter(function () { myMenu.filter('.is_hovered').removeClass("is_hovered"); $(this).addClass("is_hovered"); }); 演示: 小提琴 Don't use the mouseleave handler in ...
  • rich:jQuery能够将它匹配到组件, rich:jQuery将为您找到适当的ID。 从Richfaces开发者指南 : 当你定义一个选择器时,RichFaces会检查它的内容,并且如果找到了,就试着用选择器id替换选择器id中定义的。 同时看看你想要指定确切 ID的例子: (请注意双斜线来逃避冒号) 您可以使用#tab1作为选择器并使用rich:jQuery会用正确的ID替换它。 但是,这 ...
  • 尝试, $(document).ready(function(e) { $("#header_inner .menu-header-container ul li").hover(function() { $(this).find("a").addClass('hover'); $(this).closest(".sub-menu").slideToggle(50); }); }); Try, $(document).ready(function(e) { ...
  • 工作小提琴 看起来您的选择器不匹配.tab-links块中的任何li元素,这是您要更改类的位置。 删除这个: $(this).parent('li').addClass('active').siblings().removeClass('active'); $('#menu li ul a ' + currentAttrValue).addClass('current'); 替换为: $('.tabs .tab-links li').removeClass('active'); $('.tab-lin ...
  • 您的问题基本上在'script1.php'内部,您需要填充“connect.php”/数据。 但是当你把它拉进来时,你正在加倍研究DOM元素。 该问题的两个解决方案是:1 - 创建不包含任何DOM元素的lib php文件的更薄版本,仅填充script1.php数据所需的数据,或者 script1.php包含
  • 相关文章

    更多
  • Solr4.2迁移到新项目下异常:java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme.
  • spring 嵌套事务 的 加锁 问题
  • Hadoop FS Shell命令大全
  • Hadoop 文件系统shell命令
  • 怎么递归json嵌套json?
  • 错误及经验记录
  • EL 表达式 嵌套问题
  • Paoding 在 Solr 1.4 中使用
  • oracle中使用job
  • 关于hibernate中使用mysql函数的问题
  • 最新问答

    更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。