poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] function body doesn't return a value


From: Mohammad-Reza Nabipoor
Subject: Re: [BUG] function body doesn't return a value
Date: Sun, 10 Apr 2022 15:09:38 +0430

On Sun, Apr 10, 2022 at 12:34:39PM +0200, apache2 wrote:
> fun body1 = void: {};
> var body2 = lambda void: {};
> 
> typeof(body1);
> typeof(body2);
> 
> both give me an error:
> <stdin>:1:8: error: function doesn't return a value
> 
> is this a bug?
> 

No. You're calling functions `body1` and `body2` and giving the result
to typeof (Obviously there's no result, because of `void`).

Use this

```poke
typeof ((body1));
typeof ((body2));
```

You can get a handle to parameter-less functions, by putting
parentheses around the function name.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]