On Tue, Jan 3, 2017 at 4:22 PM, Adam Tornhill wrote:
>> 30 december 2016 15:27 skrev Don Guinn :
>> Obverse (:.) allows one to define an obverse to a user defined verb.
>
> Thanks! Is this also the way the obverses of primitives are defined in the
> implementation of J?
No, but it is closely rel
> 30 december 2016 15:27 skrev Don Guinn :
>
> Obverse (:.) allows one to define an obverse to a user defined verb.
Thanks! Is this also the way the obverses of primitives are defined in the
implementation of J?
--
For informa
Doesn't have much to do with verb inverses, but here's another (probably more
efficient) way to solve your problem:
NB. without inner vowels:
woiv=: #~ -.@vowel +. adjsep NB. keep if not a vowel or if adjacent to a
seperator
vowel=: e.&'AEIOUaeiou'
adjsep=: ((1 ,~ }.) +. 1 , }:)@sep NB. if to
1. If you knew that ;: could be used to split the words (e.g. no quotes in
the text), then using an inverse simplifies the code:
trimmer=: 3 : 0
y #~ 1 (0 _1)} -. y e. 'AEIOUaeiou'
)
tweeter=: trimmer each &. ;:
tweeter 'In what cases can J find the inverse of a verb'
In wht css cn J f
Obverse (:.) allows one to define an obverse to a user defined verb.
On Fri, Dec 30, 2016 at 7:08 AM, Adam Tornhill
wrote:
> After a few months off I'm back working through some problems in the
> Daylog APL challenge as a way of learning J. One problem is to shorten a
> message yet retain most r
After a few months off I'm back working through some problems in the Daylog APL
challenge as a way of learning J. One problem is to shorten a message yet
retain most readability by removing interior vowels from words. Here's my
rather verbose solution to this problem:
splitToWords =: ' ' & split