6 Modules -- 模块
来源:互联网 发布:找淘宝网店合作人 编辑:程序博客网 时间:2024/06/06 14:05
原文:模块
6.1 Module Basics
每一个Racket模块通常驻留在自己的文件中. 例如,假设文件”cake.rkt”包含以下模块:
“cake.rkt”
#lang racket(provide print-cake); draws a cake with n candles(define (print-cake n) (show " ~a " n #\.) (show " .-~a-. " n #\|) (show " | ~a | " n #\space) (show "---~a---" n #\-))(define (show fmt n ch) (printf fmt (make-string n ch)) (newline))
其它模五可以导入”cake.rkt”以使用print-cake
函数
6.1.1 Organizing Modules
“cake.rkt” and “random-cake.rkt”例子表明了一般的使用module组织程序的方法:放置所有的模块文件到一个单独的文件夹(可能是子文件夹),然后让模块之前通过相对路径相互引用.
6.1.2 Library Collections
6.1.3 Packages and Collections
6.1.4 Adding Collections
6.2 Module Syntax
6.2.1 The module Form
6.2.2 The #lang Shorthand
6.2.3 Submodules
6.2.4 Main and Test Submodules
6.3 Module Paths
6.4 Imports: require
6.5 Exports: provide
6.6 Assignment and Redefinition
阅读全文
0 0
- 6 Modules -- 模块
- The Python Tutorial 3.2-6Modules(模块)
- python sys.modules模块
- Python-modules(模块)
- ES6 模块modules
- freeswitch modules 模块
- freeswitch modules 模块
- Node.js Modules 模块
- freeswitch modules 模块
- Lua 标准库 - 模块(Modules)
- 开始Python -- 模块(Modules)
- Lua 标准库 - 模块(Modules)
- Lua 标准库 - 模块(Modules)
- node.js模块(Modules)
- Lua 标准库 - 模块(Modules)
- [modules] -- 设置别名,生成模块
- springboot多模块(modules)开发
- linux modules 指定模块编译
- POJ 2800
- 13. Roman to Integer
- 4 表达式与定义(Expressions and Definitions)
- JavaScript Math 对象
- 5 Programmer-Defined Datatypes
- 6 Modules -- 模块
- Gstreamer官方教程汇总基本教程3---Dynamic pipelines
- 框架部分
- 工业大数据漫谈18:工业大数据数据采集常见的工业协议简介(上)
- 7 Contracts
- 简单xsd实例
- Java 内存管理和垃圾回收机制
- win7下ftp时跳至chrome浏览器问题的修复
- oracle 中sql like下划线 _ 查询