为什么我在 Mathematica 函数中得到 Null?

问题描述

我用 mathematica 制作了一个函数,我从中得到了我想要的东西,但是最后我也得到了“Null”,我不知道为什么。

这是我的代码

x = ""
ButterflyString[y_]:=For[i = 1,i < 8,i++,x = StringTake[y,{i}] <> x] x

我的输入:

ButterflyString["Wolfram"]

我的输出

marfloW Null

解决方法

正如@Bill 在评论中发布的那样:

edestruct

这对我有用。