本文介绍了球拍,包括,要求和提供不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为functions.rkt"的文件,里面有一些函数.
I have a file with the name "functions.rkt", where I have some functions.
我正在处理另一个文件,我们将其命名为working.rkt"
And I am working in another file, let’s name it "working.rkt"
我在working.rkt"中尝试了以下(一一)以使用functions.rkt"中定义的函数:
I have tried the following (one by one) at "working.rkt" to use the function defined at "functions.rkt":
(require "functions.rkt") (include "functions.rkt") (provide "functions.rkt")他们中的任何一个都没有工作,有什么帮助吗?
And anyone of them hasn’t worked, any help?
他们在同一条路上.
推荐答案在functions.rkt"文件中:
In the file "functions.rkt:
#lang racket (provide my-function) (define (my-function x) (* 2 x))在文件working.rkt"中:
In the file "working.rkt":
#lang racket (require "functions.rkt") (my-function 21)更多推荐
球拍,包括,要求和提供不起作用
发布评论