forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpdb.jl
12066 lines (7406 loc) · 316 KB
/
helpdb.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# automatically generated from files in doc/stdlib/ -- do not edit here
Any[
("Base","exit","exit([code])
Quit (or control-D at the prompt). The default exit code is zero,
indicating that the processes completed successfully.
"),
("Base","quit","quit()
Quit the program indicating that the processes completed
successfully. This function calls \"exit(0)\" (see \"exit()\").
"),
("Base","atexit","atexit(f)
Register a zero-argument function to be called at exit.
"),
("Base","isinteractive","isinteractive() -> Bool
Determine whether Julia is running an interactive session.
"),
("Base","whos","whos([Module,] [pattern::Regex])
Print information about exported global variables in a module,
optionally restricted to those matching \"pattern\".
"),
("Base","edit","edit(file::AbstractString[, line])
Edit a file optionally providing a line number to edit at. Returns
to the julia prompt when you quit the editor.
"),
("Base","edit","edit(function[, types])
Edit the definition of a function, optionally specifying a tuple of
types to indicate which method to edit.
"),
("Base","@edit","@edit()
Evaluates the arguments to the function call, determines their
types, and calls the \"edit\" function on the resulting expression
"),
("Base","less","less(file::AbstractString[, line])
Show a file using the default pager, optionally providing a
starting line number. Returns to the julia prompt when you quit the
pager.
"),
("Base","less","less(function[, types])
Show the definition of a function using the default pager,
optionally specifying a tuple of types to indicate which method to
see.
"),
("Base","@less","@less()
Evaluates the arguments to the function call, determines their
types, and calls the \"less\" function on the resulting expression
"),
("Base","clipboard","clipboard(x)
Send a printed form of \"x\" to the operating system clipboard
(\"copy\").
"),
("Base","clipboard","clipboard() -> AbstractString
Return a string with the contents of the operating system clipboard
(\"paste\").
"),
("Base","require","require(file::AbstractString...)
Load source files once, in the context of the \"Main\" module, on
every active node, searching standard locations for files.
\"require\" is considered a top-level operation, so it sets the
current \"include\" path but does not use it to search for files
(see help for \"include\"). This function is typically used to load
library code, and is implicitly called by \"using\" to load
packages.
When searching for files, \"require\" first looks in the current
working directory, then looks for package code under \"Pkg.dir()\",
then tries paths in the global array \"LOAD_PATH\".
"),
("Base","reload","reload(file::AbstractString)
Like \"require\", except forces loading of files regardless of
whether they have been loaded before. Typically used when
interactively developing libraries.
"),
("Base","include","include(path::AbstractString)
Evaluate the contents of a source file in the current context.
During including, a task-local include path is set to the directory
containing the file. Nested calls to \"include\" will search
relative to that path. All paths refer to files on node 1 when
running in parallel, and files will be fetched from node 1. This
function is typically used to load source interactively, or to
combine files in packages that are broken into multiple source
files.
"),
("Base","include_string","include_string(code::AbstractString)
Like \"include\", except reads code from the given string rather
than from a file. Since there is no file path involved, no path
processing or fetching from node 1 is done.
"),
("Base","help","help(name)
Get help for a function. \"name\" can be an object or a string.
"),
("Base","apropos","apropos(string)
Search documentation for functions related to \"string\".
"),
("Base","which","which(f, types)
Return the method of \"f\" (a \"Method\" object) that will be
called for arguments with the given types.
"),
("Base","@which","@which()
Evaluates the arguments to the function call, determines their
types, and calls the \"which\" function on the resulting expression
"),
("Base","methods","methods(f[, types])
Show all methods of \"f\" with their argument types.
If \"types\" is specified, an array of methods whose types match is
returned.
"),
("Base","methodswith","methodswith(typ[, module or function][, showparents])
Return an array of methods with an argument of type \"typ\". If
optional \"showparents\" is \"true\", also return arguments with a
parent type of \"typ\", excluding type \"Any\".
The optional second argument restricts the search to a particular
module or function.
"),
("Base","@show","@show()
Show an expression and result, returning the result
"),
("Base","versioninfo","versioninfo([verbose::Bool])
Print information about the version of Julia in use. If the
\"verbose\" argument is true, detailed system information is shown
as well.
"),
("Base","workspace","workspace()
Replace the top-level module (\"Main\") with a new one, providing a
clean workspace. The previous \"Main\" module is made available as
\"LastMain\". A previously-loaded package can be accessed using a
statement such as \"using LastMain.Package\".
This function should only be used interactively.
"),
("Base","is","is(x, y) -> Bool
===(x, y) -> Bool
≡(x, y) -> Bool
Determine whether \"x\" and \"y\" are identical, in the sense that
no program could distinguish them. Compares mutable objects by
address in memory, and compares immutable objects (such as numbers)
by contents at the bit level. This function is sometimes called
\"egal\".
"),
("Base","isa","isa(x, type) -> Bool
Determine whether \"x\" is of the given \"type\".
"),
("Base","isequal","isequal(x, y)
Similar to \"==\", except treats all floating-point \"NaN\" values
as equal to each other, and treats \"-0.0\" as unequal to \"0.0\".
The default implementation of \"isequal\" calls \"==\", so if you
have a type that doesn't have these floating-point subtleties then
you probably only need to define \"==\".
\"isequal\" is the comparison function used by hash tables
(\"Dict\"). \"isequal(x,y)\" must imply that \"hash(x) ==
hash(y)\".
This typically means that if you define your own \"==\" function
then you must define a corresponding \"hash\" (and vice versa).
Collections typically implement \"isequal\" by calling \"isequal\"
recursively on all contents.
Scalar types generally do not need to implement \"isequal\"
separate from \"==\", unless they represent floating-point numbers
amenable to a more efficient implementation than that provided as a
generic fallback (based on \"isnan\", \"signbit\", and \"==\").
"),
("Base","isless","isless(x, y)
Test whether \"x\" is less than \"y\", according to a canonical
total order. Values that are normally unordered, such as \"NaN\",
are ordered in an arbitrary but consistent fashion. This is the
default comparison used by \"sort\". Non-numeric types with a
canonical total order should implement this function. Numeric types
only need to implement it if they have special values such as
\"NaN\".
"),
("Base","ifelse","ifelse(condition::Bool, x, y)
Return \"x\" if \"condition\" is true, otherwise return \"y\". This
differs from \"?\" or \"if\" in that it is an ordinary function, so
all the arguments are evaluated first.
"),
("Base","lexcmp","lexcmp(x, y)
Compare \"x\" and \"y\" lexicographically and return -1, 0, or 1
depending on whether \"x\" is less than, equal to, or greater than
\"y\", respectively. This function should be defined for
lexicographically comparable types, and \"lexless\" will call
\"lexcmp\" by default.
"),
("Base","lexless","lexless(x, y)
Determine whether \"x\" is lexicographically less than \"y\".
"),
("Base","typeof","typeof(x)
Get the concrete type of \"x\".
"),
("Base","tuple","tuple(xs...)
Construct a tuple of the given objects.
"),
("Base","ntuple","ntuple(n, f::Function)
Create a tuple of length \"n\", computing each element as \"f(i)\",
where \"i\" is the index of the element.
"),
("Base","object_id","object_id(x)
Get a unique integer id for \"x\". \"object_id(x)==object_id(y)\"
if and only if \"is(x,y)\".
"),
("Base","hash","hash(x[, h])
Compute an integer hash code such that \"isequal(x,y)\" implies
\"hash(x)==hash(y)\". The optional second argument \"h\" is a hash
code to be mixed with the result.
New types should implement the 2-argument form, typically by
calling the 2-argument \"hash\" method recursively in order to mix
hashes of the contents with each other (and with \"h\").
Typically, any type that implements \"hash\" should also implement
its own \"==\" (hence \"isequal\") to guarantee the property
mentioned above.
"),
("Base","finalizer","finalizer(x, function)
Register a function \"f(x)\" to be called when there are no
program-accessible references to \"x\". The behavior of this
function is unpredictable if \"x\" is of a bits type.
"),
("Base","copy","copy(x)
Create a shallow copy of \"x\": the outer structure is copied, but
not all internal values. For example, copying an array produces a
new array with identically-same elements as the original.
"),
("Base","deepcopy","deepcopy(x)
Create a deep copy of \"x\": everything is copied recursively,
resulting in a fully independent object. For example, deep-copying
an array produces a new array whose elements are deep copies of the
original elements. Calling *deepcopy* on an object should generally
have the same effect as serializing and then deserializing it.
As a special case, functions can only be actually deep-copied if
they are anonymous, otherwise they are just copied. The difference
is only relevant in the case of closures, i.e. functions which may
contain hidden internal references.
While it isn't normally necessary, user-defined types can override
the default \"deepcopy\" behavior by defining a specialized version
of the function \"deepcopy_internal(x::T, dict::ObjectIdDict)\"
(which shouldn't otherwise be used), where \"T\" is the type to be
specialized for, and \"dict\" keeps track of objects copied so far
within the recursion. Within the definition, \"deepcopy_internal\"
should be used in place of \"deepcopy\", and the \"dict\" variable
should be updated as appropriate before returning.
"),
("Base","isdefined","isdefined([object], index | symbol)
Tests whether an assignable location is defined. The arguments can
be an array and index, a composite object and field name (as a
symbol), or a module and a symbol. With a single symbol argument,
tests whether a global variable with that name is defined in
\"current_module()\".
"),
("Base","convert","convert(T, x)
Convert \"x\" to a value of type \"T\".
If \"T\" is an \"Integer\" type, an \"InexactError\" will be raised
if \"x\" is not representable by \"T\", for example if \"x\" is not
integer-valued, or is outside the range supported by \"T\".
julia> convert(Int, 3.0)
3
julia> convert(Int, 3.5)
ERROR: InexactError()
in convert at int.jl:185
If \"T\" is a \"FloatingPoint\" or \"Rational\" type, then it will
return the closest value to \"x\" representable by \"T\".
julia> x = 1/3
0.3333333333333333
julia> convert(Float32, x)
0.33333334f0
julia> convert(Rational{Int32}, x)
1//3
julia> convert(Rational{Int64}, x)
6004799503160661//18014398509481984
"),
("Base","promote","promote(xs...)
Convert all arguments to their common promotion type (if any), and
return them all (as a tuple).
"),
("Base","oftype","oftype(x, y)
Convert \"y\" to the type of \"x\" (\"convert(typeof(x), y)\").
"),
("Base","widen","widen(type | x)
If the argument is a type, return a \"larger\" type (for numeric
types, this will be a type with at least as much range and
precision as the argument, and usually more). Otherwise the
argument \"x\" is converted to \"widen(typeof(x))\".
julia> widen(Int32)
Int64
julia> widen(1.5f0)
1.5
"),
("Base","identity","identity(x)
The identity function. Returns its argument.
"),
("Base","super","super(T::DataType)
Return the supertype of DataType T
"),
("Base","issubtype","issubtype(type1, type2)
True if and only if all values of \"type1\" are also of \"type2\".
Can also be written using the \"<:\" infix operator as \"type1 <:
type2\".
"),
("Base","<:","<:(T1, T2)
Subtype operator, equivalent to \"issubtype(T1,T2)\".
"),
("Base","subtypes","subtypes(T::DataType)
Return a list of immediate subtypes of DataType T. Note that all
currently loaded subtypes are included, including those not visible
in the current module.
"),
("Base","subtypetree","subtypetree(T::DataType)
Return a nested list of all subtypes of DataType T. Note that all
currently loaded subtypes are included, including those not visible
in the current module.
"),
("Base","typemin","typemin(type)
The lowest value representable by the given (real) numeric type.
"),
("Base","typemax","typemax(type)
The highest value representable by the given (real) numeric type.
"),
("Base","realmin","realmin(type)
The smallest in absolute value non-subnormal value representable by
the given floating-point type
"),
("Base","realmax","realmax(type)
The highest finite value representable by the given floating-point
type
"),
("Base","maxintfloat","maxintfloat(type)
The largest integer losslessly representable by the given floating-
point type
"),
("Base","sizeof","sizeof(type)
Size, in bytes, of the canonical binary representation of the given
type, if any.
"),
("Base","eps","eps([type])
The distance between 1.0 and the next larger representable
floating-point value of \"type\". Only floating-point types are
sensible arguments. If \"type\" is omitted, then \"eps(Float64)\"
is returned.
"),
("Base","eps","eps(x)
The distance between \"x\" and the next larger representable
floating-point value of the same type as \"x\".
"),
("Base","promote_type","promote_type(type1, type2)
Determine a type big enough to hold values of each argument type
without loss, whenever possible. In some cases, where no type
exists to which both types can be promoted losslessly, some loss is
tolerated; for example, \"promote_type(Int64,Float64)\" returns
\"Float64\" even though strictly, not all \"Int64\" values can be
represented exactly as \"Float64\" values.
"),
("Base","promote_rule","promote_rule(type1, type2)
Specifies what type should be used by \"promote\" when given values
of types \"type1\" and \"type2\". This function should not be
called directly, but should have definitions added to it for new
types as appropriate.
"),
("Base","getfield","getfield(value, name::Symbol)
Extract a named field from a value of composite type. The syntax
\"a.b\" calls \"getfield(a, :b)\", and the syntax \"a.(b)\" calls
\"getfield(a, b)\".
"),
("Base","setfield!","setfield!(value, name::Symbol, x)
Assign \"x\" to a named field in \"value\" of composite type. The
syntax \"a.b = c\" calls \"setfield!(a, :b, c)\", and the syntax
\"a.(b) = c\" calls \"setfield!(a, b, c)\".
"),
("Base","fieldoffsets","fieldoffsets(type)
The byte offset of each field of a type relative to the data start.
For example, we could use it in the following manner to summarize
information about a struct type:
julia> structinfo(T) = [zip(fieldoffsets(T),names(T),T.types)...];
julia> structinfo(StatStruct)
12-element Array{(Int64,Symbol,DataType),1}:
(0,:device,UInt64)
(8,:inode,UInt64)
(16,:mode,UInt64)
(24,:nlink,Int64)
(32,:uid,UInt64)
(40,:gid,UInt64)
(48,:rdev,UInt64)
(56,:size,Int64)
(64,:blksize,Int64)
(72,:blocks,Int64)
(80,:mtime,Float64)
(88,:ctime,Float64)
"),
("Base","fieldtype","fieldtype(type, name::Symbol | index::Int)
Determine the declared type of a field (specified by name or index)
in a composite type.
"),
("Base","isimmutable","isimmutable(v)
True if value \"v\" is immutable. See *Immutable Composite Types*
for a discussion of immutability.
"),
("Base","isbits","isbits(T)
True if \"T\" is a \"plain data\" type, meaning it is immutable and
contains no references to other values. Typical examples are
numeric types such as \"UInt8\", \"Float64\", and
\"Complex{Float64}\".
julia> isbits(Complex{Float64})
true
julia> isbits(Complex)
false
"),
("Base","isleaftype","isleaftype(T)
Determine whether \"T\" is a concrete type that can have instances,
meaning its only subtypes are itself and \"None\" (but \"T\" itself
is not \"None\").
"),
("Base","typejoin","typejoin(T, S)
Compute a type that contains both \"T\" and \"S\".
"),
("Base","typeintersect","typeintersect(T, S)
Compute a type that contains the intersection of \"T\" and \"S\".
Usually this will be the smallest such type or one close to it.
"),
("Base","apply","apply(f, x...)
Accepts a function and several arguments, each of which must be
iterable. The elements generated by all the arguments are appended
into a single list, which is then passed to \"f\" as its argument
list.
julia> function f(x, y) # Define a function f
x + y
end;
julia> apply(f, [1 2]) # Apply f with 1 and 2 as arguments
3
\"apply\" is called to implement the \"...\" argument splicing
syntax, and is usually not called directly: \"apply(f,x) ===
f(x...)\"
"),
("Base","method_exists","method_exists(f, tuple) -> Bool
Determine whether the given generic function has a method matching
the given tuple of argument types.
julia> method_exists(length, (Array,))
true
"),
("Base","applicable","applicable(f, args...) -> Bool
Determine whether the given generic function has a method
applicable to the given arguments.
julia> function f(x, y)
x + y
end;
julia> applicable(f, 1)
false
julia> applicable(f, 1, 2)
true
"),
("Base","invoke","invoke(f, (types...), args...)
Invoke a method for the given generic function matching the
specified types (as a tuple), on the specified arguments. The
arguments must be compatible with the specified types. This allows
invoking a method other than the most specific matching method,
which is useful when the behavior of a more general definition is
explicitly needed (often as part of the implementation of a more
specific method of the same function).
"),
("Base","|>","|>(x, f)
Applies a function to the preceding argument. This allows for easy
function chaining.
julia> [1:5] |> x->x.^2 |> sum |> inv
0.01818181818181818
"),
("Base","eval","eval([m::Module], expr::Expr)
Evaluate an expression in the given module and return the result.
Every module (except those defined with \"baremodule\") has its own
1-argument definition of \"eval\", which evaluates expressions in
that module.
"),
("Base","@eval","@eval()
Evaluate an expression and return the value.
"),
("Base","evalfile","evalfile(path::AbstractString)
Evaluate all expressions in the given file, and return the value of
the last one. No other processing (path searching, fetching from
node 1, etc.) is performed.
"),
("Base","esc","esc(e::ANY)
Only valid in the context of an Expr returned from a macro.
Prevents the macro hygiene pass from turning embedded variables
into gensym variables. See the *Macros* section of the
Metaprogramming chapter of the manual for more details and
examples.
"),
("Base","gensym","gensym([tag])
Generates a symbol which will not conflict with other variable
names.
"),
("Base","@gensym","@gensym()
Generates a gensym symbol for a variable. For example, \"@gensym x
y\" is transformed into \"x = gensym(\"x\"); y = gensym(\"y\")\".
"),
("Base","parse","parse(str, start; greedy=true, raise=true)
Parse the expression string and return an expression (which could
later be passed to eval for execution). Start is the index of the
first character to start parsing. If \"greedy\" is true (default),
\"parse\" will try to consume as much input as it can; otherwise,
it will stop as soon as it has parsed a valid expression. If
\"raise\" is true (default), syntax errors will raise an error;
otherwise, \"parse\" will return an expression that will raise an
error upon evaluation.
"),
("Base","parse","parse(str; raise=true)
Parse the whole string greedily, returning a single expression. An
error is thrown if there are additional characters after the first
expression. If \"raise\" is true (default), syntax errors will
raise an error; otherwise, \"parse\" will return an expression that
will raise an error upon evaluation.
"),
("Base","start","start(iter) -> state
Get initial iteration state for an iterable object
"),
("Base","done","done(iter, state) -> Bool
Test whether we are done iterating
"),
("Base","next","next(iter, state) -> item, state
For a given iterable object and iteration state, return the current
item and the next iteration state
"),
("Base","zip","zip(iters...)
For a set of iterable objects, returns an iterable of tuples, where
the \"i\"th tuple contains the \"i\"th component of each input
iterable.
Note that \"zip\" is its own inverse: \"[zip(zip(a...)...)...] ==
[a...]\".
"),
("Base","enumerate","enumerate(iter)
Return an iterator that yields \"(i, x)\" where \"i\" is an index
starting at 1, and \"x\" is the \"i\"th value from the given
iterator. It's useful when you need not only the values \"x\" over
which you are iterating, but also the index \"i\" of the
iterations.
julia> a = [\"a\", \"b\", \"c\"];
julia> for (index, value) in enumerate(a)
println(\"\$index \$value\")
end
1 a
2 b
3 c
"),
("Base","isempty","isempty(collection) -> Bool
Determine whether a collection is empty (has no elements).
julia> isempty([])
true
julia> isempty([1 2 3])
false
"),
("Base","empty!","empty!(collection) -> collection
Remove all elements from a \"collection\".
"),
("Base","length","length(collection) -> Integer
For ordered, indexable collections, the maximum index \"i\" for
which \"getindex(collection, i)\" is valid. For unordered
collections, the number of elements.
"),
("Base","endof","endof(collection) -> Integer
Returns the last index of the collection.
julia> endof([1,2,4])
3
"),
("Base","in","in(item, collection) -> Bool
∈(item, collection) -> Bool
∋(collection, item) -> Bool
∉(item, collection) -> Bool
∌(collection, item) -> Bool
Determine whether an item is in the given collection, in the sense
that it is \"==\" to one of the values generated by iterating over
the collection. Some collections need a slightly different
definition; for example Sets check whether the item is \"isequal\"
to one of the elements. Dicts look for \"(key,value)\" pairs, and
the key is compared using \"isequal\". To test for the presence of
a key in a dictionary, use \"haskey\" or \"k in keys(dict)\".
"),
("Base","eltype","eltype(collection)
Determine the type of the elements generated by iterating
\"collection\". For associative collections, this will be a
\"(key,value)\" tuple type.
"),
("Base","indexin","indexin(a, b)
Returns a vector containing the highest index in \"b\" for each
value in \"a\" that is a member of \"b\" . The output vector
contains 0 wherever \"a\" is not a member of \"b\".
"),
("Base","findin","findin(a, b)
Returns the indices of elements in collection \"a\" that appear in
collection \"b\"
"),
("Base","unique","unique(itr[, dim])
Returns an array containing only the unique elements of the
iterable \"itr\", in the order that the first of each set of
equivalent elements originally appears. If \"dim\" is specified,
returns unique regions of the array \"itr\" along \"dim\".
"),
("Base","reduce","reduce(op, v0, itr)
Reduce the given collection \"ìtr\" with the given binary operator
\"op\". \"v0\" must be a neutral element for \"op\" that will be
returned for empty collections. It is unspecified whether \"v0\" is
used for non-empty collections.
Reductions for certain commonly-used operators have special
implementations which should be used instead: \"maximum(itr)\",
\"minimum(itr)\", \"sum(itr)\", \"prod(itr)\", \"any(itr)\",
\"all(itr)\".
The associativity of the reduction is implementation-dependent.
This means that you can't use non-associative operations like \"-\"
because it is undefined whether \"reduce(-,[1,2,3])\" should be
evaluated as \"(1-2)-3\" or \"1-(2-3)\". Use \"foldl\" or \"foldr\"
instead for guaranteed left or right associativity.
Some operations accumulate error, and parallelism will also be
easier if the reduction can be executed in groups. Future versions
of Julia might change the algorithm. Note that the elements are not
reordered if you use an ordered collection.
"),
("Base","reduce","reduce(op, itr)
Like \"reduce(op, v0, itr)\". This cannot be used with empty
collections, except for some special cases (e.g. when \"op\" is one
of \"+\", \"*\", \"max\", \"min\", \"&\", \"|\") when Julia can
determine the neutral element of \"op\".
"),
("Base","foldl","foldl(op, v0, itr)
Like \"reduce\", but with guaranteed left associativity. \"v0\"
will be used exactly once.
"),
("Base","foldl","foldl(op, itr)
Like \"foldl(op, v0, itr)\", but using the first element of \"itr\"
as \"v0\". In general, this cannot be used with empty collections
(see \"reduce(op, itr)\").
"),
("Base","foldr","foldr(op, v0, itr)
Like \"reduce\", but with guaranteed right associativity. \"v0\"
will be used exactly once.
"),
("Base","foldr","foldr(op, itr)
Like \"foldr(op, v0, itr)\", but using the last element of \"itr\"
as \"v0\". In general, this cannot be used with empty collections
(see \"reduce(op, itr)\").
"),
("Base","maximum","maximum(itr)
Returns the largest element in a collection.
"),
("Base","maximum","maximum(A, dims)
Compute the maximum value of an array over the given dimensions.
"),
("Base","maximum!","maximum!(r, A)
Compute the maximum value of \"A\" over the singleton dimensions of
\"r\", and write results to \"r\".