
scheme
scheme
guagua070707
这个作者很懒,什么都没留下…
展开
-
深入理解递归
不只是代码会有递归,设计上有递归,架构上有递归,系统中也有递归。抽象的事物也有递归。比如:sicp-mit-8_guagua070707的博客-优快云博客原创 2022-07-12 17:41:30 · 126 阅读 · 0 评论 -
函数式 连续式
函数式---> 连续式命令式---> 断开式原创 2022-06-26 08:30:17 · 133 阅读 · 0 评论 -
代码即数据
几个小伙伴在考虑下面这个各个语言都会遇到的问题:问题:设计一个命令行参数解析API一个好的命令行参数解析库一般涉及到这几个常见的方面:1) 支持方便地生成帮助信息2) 支持子命令,比如:git包含了push, pull, commit等多种子命令3) 支持单字符选项、多字符选项、标志选项、参数选项等多种选项和位置参数4) 支持选项默认值,比如:—port选项若未指定认为50375) 支持使用模式,比如:tar命令的-c和-x是互斥选项,属于不同的使用模式经过一番考察,小伙伴们发现了这个几个有代表性的API设转载 2022-06-24 16:02:46 · 2950 阅读 · 0 评论 -
chez scheme 环境搭建
引用自:Chez scheme环境搭建(WSL Ubuntu) - 知乎Chez scheme环境搭建(WSL Ubuntu)专业的大数据程序员,业余的音乐爱好者。关注1 人赞同了该文章ChezScheme安装WSL Ubuntu安装 WSLdocs.microsoft.com/zh-cn/windows/wsl/install正在上传…重新上传取消ChezScheme安装sudo apt-get install chezscheme安装成功,自动添加以下两转载 2022-05-27 08:12:45 · 439 阅读 · 0 评论 -
scheme varargs
function - How do I handle an unspecified number of parameters in Scheme? - Stack Overflow34In Scheme you can use the dot notation for declaring a procedure that receives a variable number of arguments (also known asvarargsorvariadic function):...原创 2022-05-17 09:39:55 · 120 阅读 · 0 评论 -
chez scheme 退出命令行
安装完chez scheme后,在命令行中使用scheme filepath例如:scheme /opt/scheme-test/test.ss运行后,会进入scheme解释器中,如何退出解释器?使用(exit)进行退出> (exit)原创 2022-05-16 16:19:32 · 308 阅读 · 0 评论 -
计算图 scheme
想想计算图就有思路了易经,也是先有图,后有文字原创 2022-05-09 10:33:17 · 166 阅读 · 0 评论 -
scheme map
(map proc list ...+)Applies proc to the elements of the lsts from the first elements to the last. The proc argument must accept the same number of arguments as the number of supplied lsts, and all lsts must have the same number of elements. The result is原创 2022-05-08 19:45:36 · 448 阅读 · 0 评论 -
scheme 可变参数
3.8Procedure Expressions: lambda and case-lambda3.8Procedure Expressions:lambdaandcase-lambdaFunctions:lambdainThe Racket Guideintroduces procedure expressions. syntax (lambdakw-formalsbody...+) ...原创 2022-05-06 07:20:00 · 220 阅读 · 0 评论 -
scheme macro
6.8.2 Syntax-rules Macrossyntax-rulesmacros are simple, pattern-driven syntax transformers, with a beauty worthy of Scheme.Syntax:syntax-rulesliterals (pattern template) …Create a syntax transformer that will rewrite an expression using the rules ...原创 2022-04-28 18:24:46 · 288 阅读 · 0 评论 -
scheme struct
Beautiful Racket: Importing & exportingAstructure typeis a user-defined data structure with an arbitrary number of fields. Like a hash table, a structure type allows access to its fields by name. Like a vector, the number of fields is fixed ..原创 2022-04-28 15:16:09 · 117 阅读 · 0 评论 -
scheme macro
https://en.wikibooks.org/wiki/Scheme_Programming/MacrosScheme Programming/Macros<Scheme ProgrammingJump to navigationJump to searchMacros are said to be what makes LispLisp. Other programming languages, notably C and C++, have macros, but th..转载 2022-04-26 15:23:28 · 122 阅读 · 0 评论 -
scheme macro 宏
参考自:Scheme宏基础入门(转载)Scheme的宏比Lisp的宏简单,但是它有些看起来奇怪的“语法”却很少有文章进行过解释或者文章说了这点却容易忽略,使得我以前对Scheme宏的学习一直摸不到头脑,在看了很多篇有关Scheme宏的介绍文章后,觉得这篇文章写的是最容易理解的了,虽然不能算浅显易懂,有可能宏这个东西说得浅显了就不太容易懂。原文地址:Syntax宏 · 大专栏 (dazhuanlan.com)。另外一篇Scheme官方介绍宏使用的文章链接:Syntactic Extension .原创 2022-04-26 14:38:39 · 385 阅读 · 0 评论 -
对列表中每个元素,它都会重复相同的动作
对列表中每个元素,它都会重复相同的动作mapfor-each原创 2022-04-25 15:13:19 · 105 阅读 · 0 评论 -
命名let
命名let第六章 递归 - 《Scheme简明教程》 - 书栈网 · BookStack(let countdown ((i 10)) (if (= i 0) 'liftoff (begin (display i) (newline) (countdown (- i 1)))))原创 2022-04-25 14:32:07 · 142 阅读 · 0 评论 -
letrec是专门为局部的递归和互递归过程而设置的
letrec是专门为局部的递归和互递归过程而设置的可以使用define来代替,不需要使用letrec,尽量保持简单原创 2022-04-25 14:30:06 · 265 阅读 · 0 评论 -
let嵌套的缩写
let*就是:更深了说,实际上就是let嵌套的缩写原创 2022-04-25 11:26:52 · 107 阅读 · 0 评论 -
没有参数的过程也称作thunk
没有参数的过程也称作thunk原创 2022-04-25 11:24:20 · 197 阅读 · 0 评论 -
delimited contintuation
https://en.wikipedia.org/wiki/Delimited_continuationDelimited continuationFrom Wikipedia, the free encyclopediaJump to navigationJump to searchInprogramming languages, adelimited continuation,composable continuationorpartial continuation, is a...转载 2022-04-16 13:57:29 · 217 阅读 · 0 评论 -
quote unquote unquote-splicing
参考自:Scheme语言深入_xiao_wanpeng的博客-优快云博客一、关于符号类型符号类型又称引用类型,在概要一文中本人介绍得非常的模糊,使很多初学者不理解。符号类型在Scheme语言中是最基础也是最重要的一种类型,这是因为Scheme语言的祖先Lisp语言的最初目的就是符号处理,在Scheme语言中几乎所有的东西都可以看做是符号或做为符号列表来处理,这也是我们把符号类型做为第一个问题研究的原因。与符号类型相关的关键字有四个,分别是:quote, quasiquote, unquot转载 2022-04-12 11:27:58 · 225 阅读 · 0 评论 -
Quasiquoting: quasiquote, unquote, and unquote-splicing
3.20Quasiquoting:quasiquote,unquote, andunquote-splicingQuasiquoting:quasiquoteand‘inThe Racket Guideintroducesquasiquote. syntax (quasiquotedatum) The same as'datumifdatumdoes not include(unquoteexpr...转载 2022-04-12 11:24:06 · 164 阅读 · 0 评论 -
漫谈程序控制流
漫谈程序控制流 - liguangsunls - 博客园随着JavaScript最新版本号ECMAScript2015(ES6)的正式公布,以及babel这样的ES6转ES5的工具的慢慢成熟,在真实产品里使用ES6已经全然可行了。写JS的朋友们,是时候点开es6features看一下了。值得一提的是。ES6特性里居然包含尾调用优化(tailcall),真是要点个赞。然而,这并没有什么用。从ES6的Generator谈起在ES6众多新特性里。Generator无疑是一个..转载 2022-04-01 19:54:57 · 296 阅读 · 0 评论 -
scheme如何debug
参考自:https://stackoverflow.com/questions/4526356/how-do-i-step-through-and-debug-a-scheme-program-using-dr-racket#:~:text=DrRacket%20includes%20a%20graphical%20debugging,options%20to%20set%20break%2Dpoints.原创 2022-04-01 19:54:06 · 391 阅读 · 0 评论 -
map contract violation
map: contract violation 违反约定expected: list?given: 3原创 2022-03-30 14:27:27 · 87 阅读 · 0 评论 -
map filter fold与集合
map、filter、fold操作的都是集合,也就是参数里面都是集合,看到集合的时候,就要想到map、filter、fold原创 2022-03-29 07:24:35 · 351 阅读 · 0 评论 -
scheme 把一个symbol变成一个procedure
Applying a symbol as a procedureAsk QuestionAsked12 years, 4 months agoModified12 years, 3 months agoViewed1k timesReport this ad2Suppose I have a simple symbol:> '++Is there any way I can apply that sy...原创 2022-03-28 07:38:13 · 193 阅读 · 0 评论 -
scheme中判断一个元素是否为atom的
参考自:scheme - Check if an argument is a list or an atom - Stack Overflow21Usually, you'll want to exclude the empty list too:(define (atom? x) (not (or (pair? x) (null? x))))or, if you want to be more pedantic, then forbid vectors too:(defi原创 2022-03-27 10:52:00 · 480 阅读 · 0 评论 -
Nth Element of a List in Scheme
参考自:https://seaneshbaugh.com/posts/nth-element-of-a-list-in-schemeNth Element of a List in SchemeOctober 14, 2013 4:53:21 PMCommon LispandClojureboth provide a built-innthfunction for retrieving the nth element in a list. Surprisingly enough S...原创 2022-03-26 16:34:39 · 625 阅读 · 0 评论 -
scheme 判断一个symbol是否为pair
参考自:2.4Pairs, Lists, and Scheme Syntax2.4Pairs, Lists, and Scheme SyntaxTheconsfunction actually accepts any two values, not just a list for the second argument. When the second argument is notemptyand not itself produced bycons, the result pr...原创 2022-03-26 15:57:37 · 477 阅读 · 0 评论 -
pair 包含一切
pair中两个元素,就像阴阳,能生万物如果只有car或者是cdr,就成了孤阴不长,独阳不生原创 2022-03-26 08:47:50 · 363 阅读 · 0 评论 -
scheme中define和set
参考自:In Scheme, what's the point of "set!"? - Stack Overflow原创 2022-03-25 11:44:49 · 462 阅读 · 0 评论 -
编程中最重要的原理:naming
编程中最重要的原理:naming原创 2022-03-25 11:30:48 · 115 阅读 · 0 评论 -
scheme list
最后一个一定为空,如果不为空,则为pair,不是listCSE 341 -- Scheme Basics原创 2022-03-25 11:05:20 · 231 阅读 · 0 评论 -
scheme教程
参考自:The Scheme Programming Language, 4th EditionTable of ContentsPreface Chapter 1. Introduction Section 1.1. Scheme Syntax Section 1.2. Scheme Naming Conventions Section 1.3. Typographical and Notational Conventions Chapter 2原创 2022-03-25 10:54:48 · 558 阅读 · 0 评论 -
scheme简明教程
参考自:CSE 341 -- Scheme BasicsCSE 341 -- Scheme BasicsScheme profileLisp dialect mostly functional (but not purely functional) dynamic typing; type safe exclusively heap-based storage w/ GC pass by value with pointer semantics lexically scoped (转载 2022-03-25 10:52:23 · 1321 阅读 · 0 评论 -
集合与流 collection stream
任何一个集合都可以转化为一个流集合与流是一一对应的原创 2022-03-24 14:29:55 · 362 阅读 · 0 评论 -
scheme 中文教程
参考自:有没有scheme中文教程,要尽量简单的。? - 知乎作者:include-yy链接:https://www.zhihu.com/question/472968356/answer/2005419788来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。《Scheme 简明教程》:teach-yourself-scheme-in-fixnum-daysScheme简明教程 - 《Scheme简明教程》 - 书栈网 · BookStackwww.b.原创 2022-03-24 11:13:36 · 1232 阅读 · 0 评论 -
compose函数
var show = console.log;function compose(f, g) { return x => f(g(x));}var g = x => "value is " + x;var f = show;/** * c1的值为 x => f(g(x)) * 即:x => show((x => "value is " + x)(x)) * 是下面函数的缩写 * x => (x => show(x)) ((x ...原创 2022-03-23 11:01:21 · 360 阅读 · 0 评论 -
scheme delay
记住:执行的时候,不是...(),而是(() => ... )()/** * delay 是() => ...执行的时候是(() => ... )()值为...执行的时候不是...() * * */原创 2022-03-22 17:28:15 · 290 阅读 · 0 评论 -
understanding-javascript-promises
参考自:Understanding JavaScript PromisesUnderstanding JavaScript PromisesTABLE OF CONTENTSIntroduction to promisesA promise is commonly defined asa proxy for a value that will eventually become available.Promises are one way to deal with asynchr.转载 2022-03-21 15:06:35 · 230 阅读 · 0 评论