text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
(ca's NSString's stringWithString:strPath)) atomically:true ¬ | asPrelude.applescript |
encoding:(ca's NSUTF8StringEncoding) |error|:(missing value) | asPrelude.applescript |
end writeFile | asPrelude.applescript |
on writeFileLR(strPath, strText) | asPrelude.applescript |
set fp to stringByStandardizingPath of ¬ | asPrelude.applescript |
(ca's NSString's stringWithString:strPath) | asPrelude.applescript |
set {bln, e} to (ca's NSString's stringWithString:strText)'s ¬ | asPrelude.applescript |
writeToFile:(fp) atomically:true ¬ | asPrelude.applescript |
encoding:(ca's NSUTF8StringEncoding) |error|:(reference) | asPrelude.applescript |
if bln and (missing value is e) then | asPrelude.applescript |
|Right|(fp as string) | asPrelude.applescript |
|Left|(e's localizedDescription() as string) | asPrelude.applescript |
end writeFileLR | asPrelude.applescript |
on writeTempFile(template, txt) | asPrelude.applescript |
set strPath to (current application's ¬ | asPrelude.applescript |
writeFile(strPath, txt) | asPrelude.applescript |
strPath | asPrelude.applescript |
end writeTempFile | asPrelude.applescript |
zipWith(Tuple, xs, ys) | asPrelude.applescript |
on zip3(xs, ys, zs) | asPrelude.applescript |
TupleN({x, item i of ys, item i of zs}) | asPrelude.applescript |
map(result, items 1 thru ¬ | asPrelude.applescript |
minimum({length of xs, length of ys, length of zs}) of xs) | asPrelude.applescript |
end zip3 | asPrelude.applescript |
on zip4(ws, xs, ys, zs) | asPrelude.applescript |
on |λ|(w, i) | asPrelude.applescript |
TupleN({w, item i of xs, item i of ys, item i of zs}) | asPrelude.applescript |
end zip4 | asPrelude.applescript |
on zipGen(ga, gb) | asPrelude.applescript |
property ma : missing value | asPrelude.applescript |
property mb : missing value | asPrelude.applescript |
if missing value is ma then | asPrelude.applescript |
set ma to uncons(ga) | asPrelude.applescript |
set mb to uncons(gb) | asPrelude.applescript |
if Nothing of ma or Nothing of mb then | asPrelude.applescript |
set ta to Just of ma | asPrelude.applescript |
set tb to Just of mb | asPrelude.applescript |
set x to Tuple(|1| of ta, |1| of tb) | asPrelude.applescript |
set ma to uncons(|2| of ta) | asPrelude.applescript |
set mb to uncons(|2| of tb) | asPrelude.applescript |
end zipGen | asPrelude.applescript |
on zipList(xs, ys) | asPrelude.applescript |
{x, item i of ys} | asPrelude.applescript |
map(go, items 1 thru lng of xs) | asPrelude.applescript |
end zipList | asPrelude.applescript |
on zipN(argv) | asPrelude.applescript |
if 1 < length of argv then | asPrelude.applescript |
script peers | asPrelude.applescript |
item i of y | asPrelude.applescript |
tupleFromList(map(peers, argv)) | asPrelude.applescript |
map(go, take(minimum(map(my |length|, argv)), ¬ | asPrelude.applescript |
item 1 of argv)) | asPrelude.applescript |
argv | asPrelude.applescript |
end zipN | asPrelude.applescript |
on zipWith(f, xs, ys) | asPrelude.applescript |
set lng to min(|length|(xs), |length|(ys)) | asPrelude.applescript |
if 1 > lng then return {} | asPrelude.applescript |
set xs_ to take(lng, xs) -- Allow for non-finite | asPrelude.applescript |
set ys_ to take(lng, ys) -- generators like cycle etc | asPrelude.applescript |
set end of lst to |λ|(item i of xs_, item i of ys_) | asPrelude.applescript |
end zipWith | asPrelude.applescript |
on zipWith3(f, xs, ys, zs) | asPrelude.applescript |
set lng to minimum({length of xs, length of ys, length of zs}) | asPrelude.applescript |
set end of lst to |λ|(item i of xs, item i of ys, item i of zs) | asPrelude.applescript |
end zipWith3 | asPrelude.applescript |
on zipWith4(f, ws, xs, ys, zs) | asPrelude.applescript |
set lng to minimum({length of ws, length of xs, length of ys, length of zs}) | asPrelude.applescript |
set end of lst to |λ|(item i of ws, item i of xs, item i of ys, item i of zs) | asPrelude.applescript |
end zipWith4 | asPrelude.applescript |
on zipWithGen(f, ga, gb) | asPrelude.applescript |
|λ|(|1| of ta, |1| of tb) of mf | asPrelude.applescript |
end zipWithGen | asPrelude.applescript |
on zipWithList(f, xs, ys) | asPrelude.applescript |
set end of lst to |λ|(item i of xs, item i of ys) | asPrelude.applescript |
end zipWithList | asPrelude.applescript |
on zipWithM(fm, xs, ys) | asPrelude.applescript |
traverseList(my identity, zipWith(fm, xs, ys)) | asPrelude.applescript |
end zipWithM | asPrelude.applescript |
on zipWithN(f, rows) | asPrelude.applescript |
script nth | asPrelude.applescript |
item i of row | asPrelude.applescript |
mf's |λ|(map(nth, rows)) | asPrelude.applescript |
map(go, enumFromTo(1, minimum(map(my |length|, rows)))) | asPrelude.applescript |
end zipWithN | asPrelude.applescript |
tell application "iTunes" to play | itunes_play.scpt |
if (count of argv) > 0 then | count-list.applescript |
set reminder_list to item 1 of argv | count-list.applescript |
error "Please provide a list name as the first argument to this script" | count-list.applescript |
tell application "Reminders" | count-list.applescript |
set the_list to list reminder_list | count-list.applescript |
set the_reminders to (reminders in the_list whose completed is false) | count-list.applescript |
set list_size to count of the_reminders | count-list.applescript |
return list_size | count-list.applescript |
copyAsMarkdown() | Copy as Markdown.applescript |
on copyAsMarkdown() | Copy as Markdown.applescript |
tell content of document window 1 | Copy as Markdown.applescript |
set theSelectedTrees to value of every selected tree | Copy as Markdown.applescript |
repeat with theTree in theSelectedTrees | Copy as Markdown.applescript |
set theTitle to name of theTree | Copy as Markdown.applescript |
set theNote to note of theTree | Copy as Markdown.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.