require '~addons/debug/dissect/dissect.ijs'
    
pas=: 13 :'(i.>:y)!y'
pas 

pas 3
pas 4

NB. BINOMIAL PROBABILITIES
bp=:([: pas [) * (] ^ [: i. [: >: [) * (1: - ]) ^ [: |. [: i. [: >: [
bp

3 bp 0.5
4 bp 0.1

ds '3(([: pas [) * (] ^ [: i. [: >: [) * (1: - ]) ^ [: |. [: i. [: >: [ )
0.5'
ds '4(([: pas [) * (] ^ [: i. [: >: [) * (1: - ]) ^ [: |. [: i. [: >: [ )
0.1'

This would have been great when I was teaching the Binomial Distribution in
probability!

Linda

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Henry Rich
Sent: Monday, June 03, 2013 8:27 PM
To: [email protected]
Subject: Re: [Jprogramming] z458095869_dissectnopath_

I have fixed the display error and now the testcase fails the way it ought
to, with unexpected results from the verb.  A fix for that will have to
await support of $: .

Henry Rich

On 6/3/2013 12:59 PM, Raul Miller wrote:
> My thoughts on this include:
>
> All verbs are tacit verbs, even explicit verbs in a sort of empty 
> sense.  And, 5!:5 <'name' could be a good thing to run ds on.
>
> I think ds has a problem with $: and this is related to some issues 
> that might come up when dealing with named code (or at least, when 
> thinking about code naming issues it occurred to me that I should test 
> how ds deals with $:):
>     (0 >. ]`($:@<:)@.*) 3
> 0
>     ds '(0 >. ]`($:@<:)@.*) 3'
> |assertion failure: sizesentence
>
> ds would be a good companion to a ui for trace. Where trace shows you 
> the parsing of a sentence, ds will show you the data flow which occurs 
> afterwards. But there are clear limitations on this approach, for 
> example if the sentence uses ? ds should show different data each time 
> it's used.
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to