小编Joa*_*nna的帖子

Haskell编写你的(.)函数版本

有人可以帮我在Haskell中编写自己的(.)函数版本吗?从这篇文章Haskell写你的($)函数的版本我知道如何确定这个函数的类型,但我的身体仍然有问题.我也不知道为什么ghci拒绝使用名称(..).

 ($$$) :: (b -> c) -> (a -> b) -> a -> c 
 ($$$) f (g x) = ((f g) $) x
 infixr 9 $$$
Run Code Online (Sandbox Code Playgroud)

我的另一个想法就是这个:

($$$) :: (b -> c) -> (a -> b) -> a -> c 
($$$) f (g x) = map (f) (g x)
infixr 9 $$$
Run Code Online (Sandbox Code Playgroud)

错误消息显示"模式中的解析错误:g".

haskell

2
推荐指数
1
解决办法
118
查看次数

Haskell编写你的($)函数版本

有人可以帮我编写自己的($)函数版本吗?这是我的尝试不起作用.

f function (x:xs) = f (x:xs)
Run Code Online (Sandbox Code Playgroud)

haskell

-1
推荐指数
1
解决办法
86
查看次数

汇编二维数组为什么地址没有相同的数字

我在C中创建了一个简单的二维数组,并传递了一个指向汇编函数的指针.我想用汇编函数处理这个数组中的元素.我的问题是我不明白(也许这是我的错误)为什么同一行中元素的地址没有相同的数字.我想处理汇编中的所有元素,但由于地址相差4美元或6美元,我不知道该怎么做.

Adres 1156660110    Adres 1156660114    Adres 1156660120    Adres 1156660124    Adres 1156660130    Adres 1156660134    Adres 1156660140    Adres 1156660144    Adres 1156660150    Adres 1156660154    Adres 1156660160    Adres 1156660164    Adres 1156660170    Adres 1156660174    Adres 1156660200    

Adres 1156660210    Adres 1156660214    Adres 1156660220    Adres 1156660224    Adres 1156660230    Adres 1156660234    Adres 1156660240    Adres 1156660244    Adres 1156660250    Adres 1156660254    Adres 1156660260    Adres 1156660264    Adres 1156660270    Adres 1156660274    Adres 1156660300    

Adres 1156660310    Adres 1156660314    Adres 1156660320    Adres 1156660324    Adres 1156660330    Adres 1156660334    Adres 1156660340    Adres 1156660344    Adres 1156660350    Adres …
Run Code Online (Sandbox Code Playgroud)

c assembly i386

-1
推荐指数
1
解决办法
57
查看次数

标签 统计

haskell ×2

assembly ×1

c ×1

i386 ×1