OpenLLM-France/wikimedia huggingface dataset:
# Clojure Programming/Examples/API Examples

This page gives example usage for Clojure API function calls. For a more general introduction to Clojure by example please see http://en.wikibooks.org/wiki/Clojure_Programming/By_Example

## Documentation

This page provides examples for the following functions.
* doc
* find-doc
* source

## Data Structures
### Numbers

| Computation | + | - | * | / | inc | dec | min | max | rem | rationalize |
| Comparison | == | < | > | <= | >= |
| Predicates | zero? | pos? | neg? |

### Strings

* str

### Characters
## Advanced Data Structures
### Maps

* get
* assoc-in
* merge

### Struct Maps

* accessor
* assoc
* defstruct
* struct
* struct-map

### Sets

* union

### Zippers

* zipper
* zipmap

## Sequences

* interpose
* interleave
* reverse
* butlast
* replace

### Sequence Building

* conj
* concat
* merge

### Mapping Operators

This page provides examples for the following functions.
* map
* reduce
* apply

## Macros

* cond
* condp

### do Macros

This page provides examples for the following functions.
* doseq
* doall
* dorun
* doto

## Variable Definition

This page provides examples for the following functions.
* def
* binding

## MultiMethod

This page defines the following functions
* defmulti
* defmethod

## Reference Tools

This page defines the following functions.
* ref
* ref-set
* deref
* delay
* force
* commute

## Predicate functions

This page provides examples for the following functions.
* drop-while
* filter
* not-any
* remove
* every?
* some

## Recursion Tools

This page defines the following functions.
* loop
* recur
* lazy-cons

## Function Tools

This page provides examples for the following functions.
* fn
* "lambda"
* complement

## Java Interaction

This page provides examples for the following functions.
* memfn
* proxy
* into-array
* double-array
* genclass
# Clojure Programming/Examples/API Examples/Advanced Data Structures
## Maps
#### get

get also accepts an optional third argument which is returned if key is not found in map:

#### merge

Combine two maps into a more massive map
Using merge-with (ClojureDocs) you can specify what course of action to take for collisions, here we decide to join collisions into a set using union (sets in the Cookbook):

#### update-in
## Struct Maps
#### assoc

See struct-map for more.

#### defstruct

See struct-map for more.

#### struct

See struct-map for more.

#### struct-map
## Zippers
#### zipper

A zipper is a way to modify a tree in a functional way- To do this conveniently, there needs to be a way for you to "drill down" a branch in the tree and perform a local edit, without having to tediously rebuild the upper areas of the tree again. In this example, the vector-zip function converts nested arrays into a zipper. Then we "drill down" the zipper with "down" and "right". Once we've reached the node we want to edit, we do so with "edit", in this case, incrementing the number. Then we can call "root" to convert the zipper back into nested arrays. Note that we were able to efficiently make a pinpoint change in the tree in a very elegant manner.
# ERP Internals/Modules/Workflow/Functions/Maintain Module Information

Some parameters and data tables are used by every module. These are maintained by Systems Administration. But, every module has some parameters and/or data tables that it alone uses. Systems Administration can change this information but each module has a function "Maintain Module Information" that can change it as well. This allows segments of systems administration to be delegated to the senior person in charge of a particular module.
# ETD Guide/Introduction/Accelerate workflow: graduate more quickly, make ETDs available faster to outside audience

ETDs can be managed through automated procedures honed to take advantage of modern networked information systems. Since the shift to ETDs requires policy and process discussion among campus stakeholders, it is possible to streamline workflow and save time and labor. Checking of submissions and cataloging is sped up, moving and handling of paper copies is eliminated, and delays for binding are removed. The time between submission and graduation can be reduced, and ETDs can be made available for access within days or weeks rather than months.
Next Section: Costs and benefits
# ETD Guide/Introduction/ETDs as new genre of documents

With thousands of students each year preparing ETDs, the creativity of the newest generation of scholars is being continuously expressed as they work to present their research results using the most appropriate form, structure, and content. While conforming as needed to the requirements of their institution, department, and discipline, students should develop and apply skills that will best prepare them for their future careers and lead to the most expressive rendering possible of their discoveries and ideas. Thus, ETDs are a new genre of documents, continuously re-defined as technology and student knowledge evolve.
The first benefit is that new, better types of TDs may emerge as ETDs develop as a genre. Rather than being bound by the limits of old-style typewriters, students may be freed to include color diagrams and images, dynamic constructs like spreadsheets, interactive forms such as animations, and multimedia resources including audio and video. To ensure preservation of the raw data underlying their work, promote learning from their experience, and facilitate confirmation of their findings, they may enhance their ETDs by including the key datasets that they have assembled.
As the new genre of ETDs emerges from this growing community of scholars, it is likely to build upon earlier forms. Simplest are documents that can be thought of as “electronic paper” where the underlying authoring goal is to produce a paper form, perhaps with color used in diagrams and images. Slightly richer are documents that have links, as in hypertext, at least from tables of contents, tables of figures, tables of tables, and indexes – all pointing to target locations in the body of the document. To facilitate preservation, some documents may be organized in onion-fashion, with a core mostly containing text (that thus may be printable), appendices including multimedia content following international standards, and supplemental files including data and interactive or dynamic forms that may be harder to migrate as the years pass by. Programs, applets, simulations, virtual environments, and other constructs yet to be discovered may be shared by students who aim to communicate their findings using the most suitable objects and representations
Next Section: Why ETDs?
# ETD Guide/Introduction/Browsing: Classification systems, classification schemes used in different disciplines

A key method to gain access to ETDs is through browsing. Browsing promotes serendipity, in analogous fashion to when a person looks around in library stacks, picking up and glancing at a number of works, typically ones that are relatively close to each other.
Browsing often involves a researcher in a learning process connecting with the concepts, areas, and vocabulary used in a particular field. A researchers often moves around in "concept space", seeing what concepts are broader and which are narrower, which are related, and which are examples or applications of theories or methods. Thus, in the case of medical works, browsing often encourages researchers to think about diseases, treatments, location in an organism (or human body or subsystem thereof), symptoms, and other considerations. In many fields, browsing involves exploring a taxonomic system, managing an organization chart or hierarchical structure, or moving from a term to a more focused noun phrase.
In many disciplines, there are official classification systems. Some are quite broad, in some cases covering all areas, as is the case when using the subject headings prepared by the US Library of Congress (LCSH), or the Dewey Decimal Classification system (DDC, available from Forest Press, owned by OCLC). However, for in-depth characterization of a research work in a particular field, it is more appropriate to use the category system for the field. In computing, the ACM system is popular. In medicine, MeSH or UMLS are widely used. In physics, PACS is widely used. Gradually, digital library support for ETDs will support browsing using both broad schemes like DDC, as well as narrow schemes like PACS, integrated synergistically.
Next Section: Well known sites and resources for ETDs
# ETD Guide/Introduction/Costs and benefits

ETD submission over networks has zero cost, which compares favorably with the charges of hundreds or thousands of dollars otherwise required to print, copy, or publish TDs using paper or other media forms. In many institutions, the networking, computing, and software resources available to students suffice so that students preparing ETDs need make no additional expenditure. Similarly, on many campuses, assistance is available to answer questions and train students regarding word processing and other skills valuable for authors of electronic documents and users of digital libraries. If students elect to use personal computers and acquire their own software to use in ETD creation, these will later be useful in other research and development work, for both professional and personal needs, with low marginal expense specifically required for ETDs. Thus, it is typical that the pros far outweigh the cons regarding students preparing ETDs.
Next Section: Purpose, goals, objectives of ETD activities
# ETD Guide/Introduction/Global cooperation in ETD activities

There continues to be rapid growth and development of ETD activities around the world. Whether such efforts arise spontaneously or as extensions of existing efforts, it is hoped that all will proceed in cooperative fashion so universities can help each other in a global collaboration [4], passing on lessons learned as well as useful tools and information. The mission of NDLTD is to facilitate such progress in a supportive rather than prescriptive manner. Over 100 members joined NDLTD by 2000, including over 80 universities in addition to national and regional project efforts; international, national, and regional organizations; and interested companies and associations. The only requirement for joining NDLTD is interest in advancing ETD activities, so it is hoped this will help ensure global cooperation.
A number of groups involved in NDLTD are particularly interested in supporting efforts in developing countries. The sharing of research results through ETDs is one of the fastest ways for scholars working in developing countries to become known and have an impact on the advancement of knowledge. It also is one of the easiest and least costly ways for universities in developing countries to become involved in digital library activities and to become known for their astute deployment of relevant and helpful technologies. The Organization of American States, UNESCO, and other groups are playing a most supportive role in facilitating this process.
Next Section: Overview of rest of the Guide
# ETD Guide/Introduction/Brief history of ETD activities: 1987-2007

The first real activity directed toward ETDs was a meeting convened by Nick Altair of UMI in Ann Arbor, Michigan during the fall of 1987 involving participants from Virginia Tech, ArborText, SoftQuad, and University of Michigan. Discussion focussed on the latest approaches to electronic publishing and the idea of applying the Standard Generalized Markup Language (SGML, an ISO standard approved in 1985) to the preparation of dissertations, possibly as an extension of the Electronic Manuscript Project. In 1988, Yuri Rubinsky of SoftQuad was funded by Virginia Tech to help develop the first Document Type Definition (DTD) to specify the structure of ETDs using SGML. Pilot studies continued using SoftQuad’s AuthorEditor tool, but only with the appearance of Adobe’s Acrobat software and Portable Document Format (PDF) in the early 1990s did it become clear that students could easily prepare their own ETDs.
In 1992 Virginia Tech joined with the Coalition for Networked Information, the Council of Graduate Schools, and UMI, to invite ten other universities to select three representatives each, from their library, graduate school/program, and computing/information technology groups. This meeting in Washington, D.C. demonstrated the strong interest in and feasibility of ETD activities among US and Canadian universities. In 1993, the Southeastern Universities Research Association (SURA) and Southeastern Library Network (Solinet) decided to include ETD efforts in regional electronic library plans. Virginia Tech hosted another meeting involving multiple universities in Blacksburg, VA in 1994 to develop specific plans regarding ETD projects. On the technical side, the decision was made that whenever feasible, students should prepare ETDs using appropriate multimedia standards in addition to both a descriptive (e.g., SGML) and rendered (e.g., PDF) form for the main work.
Then, in 1996, the pace of ETD activities sped up. SURA funded a project led by Virginia Tech to spread the concept around the Southeastern United States. Starting in September 1996, the US Department of Education funded a three-year effort to spread the concept around the USA. The pilot project that had proceeded at Virginia Tech led to a mandatory requirement for all theses and dissertations submitted after 1996 to be submitted (only) in electronic form. International interest spread the concept to Canada, UK, Germany, and other countries. To coordinate all these efforts, the free, voluntary federation called NDLTD (Networked Digital Library of Theses and Dissertations) was established and quickly began to expand. Annual meetings began in the spring of 1998 with about 20 people gathering in Memphis, TN. In 1999 about 70 came to Blacksburg, VA while in 2000 about 225 arrived in St. Petersburg, FL for the third annual conference.
Next Section: Global cooperation in ETD activities
# ETD Guide/Introduction/Enhancing access to university research

Once ETDs are available, through diverse means, others may gain access. In particular, such access may be the only recourse open to those in developing countries who cannot afford to make purchases from Proquest, who cannot wait for expensive shipping of copies through interlibrary loan, who cannot attend the myriad conferences that demand the considerable expenses related to travel, or who cannot pay for expensive journals (that only may have short summaries of thesis or dissertation results).
Access may result from word of mouth, from search, from announcements, or by following links or citations. They may occur quickly after a work is made known to those whose works are referred to or to those who employ Selective Dissemination of Information services. They may occur intermediated by digital library systems or similar mechanisms. They may result when ETDs are referred to journal articles, conference papers, reports, course notes, and other forms.
Numerically, if theses and dissertations are all released as ETDs, the number of works per year may be around the number of journal articles published by university students. The number may be 20-50% of the number of journal articles prepared by the faculty. Regarding students, in most cases, an ETD will be the only publication of an author. If the number who read ETDs is 10 or 100 times the number who read a paper thesis, then it is clear that there will be a significant increase in access to university research as a result of an ETD program.
Next Section: Searching
# Calculus/Higher Order Derivatives

The second derivative, or second order derivative, is the derivative of the derivative of a function. The derivative of the function $f(x)$ may be denoted by $f'(x)$ , and its double (or "second") derivative is denoted by $f''(x)$ . This is read as "$f$ double prime of $x$", or "The second derivative of $f(x)$". Because the derivative of function $f$ is defined as a function representing the slope of function $f$ , the double derivative is the function representing the slope of the first derivative function.
Furthermore, the third derivative is the derivative of the derivative of the derivative of a function, which can be represented by $f'''(x)$ . This is read as "$f$ triple prime of $x$", or "The third derivative of $f(x)$" . This can continue as long as the resulting derivative is itself differentiable, with the fourth derivative, the fifth derivative, and so on. Any derivative beyond the first derivative can be referred to as a higher order derivative.

## Notation

Let $f(x)$ be a function in terms of $x$ . The following are notations for higher order derivatives.
| 2nd Derivative | 3rd Derivative | 4th Derivative | $n$-th Derivative | Notes |
| $f''(x)$ | $f'''(x)$ | $f^{(4)}(x)$ | $f^{(n)}(x)$ | Probably the most common notation. |
| ${\frac {d^{2}f}{dx^{2}}}$ | ${\frac {d^{3}f}{dx^{3}}}$ | ${\frac {d^{4}f}{dx^{4}}}$ | ${\frac {d^{n}f}{dx^{n}}}$ | Leibniz notation |
| ${\frac {d^{2}}{dx^{2}}}[f(x)]$ | ${\frac {d^{3}}{dx^{3}}}[f(x)]$ | ${\frac {d^{4}}{dx^{4}}}[f(x)]$ | ${\frac {d^{n}}{dx^{n}}}[f(x)]$ | Another form of Leibniz notation |
| $D^{2}f$ | $D^{3}f$ | $D^{4}f$ | $D^{n}f$ | Euler's notation |
Warning: You should not write $f^{n}(x)$ to indicate the $n$-th derivative, as this is easily confused with the quantity $f(x)$ all raised to the nth power.
The Leibniz notation, which is useful because of its precision, follows from
    ${\frac {d}{dx}}\left({\frac {df}{dx}}\right)={\frac {d^{2}f}{dx^{2}}}$
Newton's dot notation extends to the second derivative, ${\ddot {y}}$ , but typically no further in the applications where this notation is common.

## Examples
### Example 1

Find the third derivative of $f(x)=4x^{5}+6x^{3}+2x+1$ with respect to $x$.
Repeatedly apply the Power Rule to find the derivatives.
* $f'(x)=20x^{4}+18x^{2}+2$
* $f''(x)=80x^{3}+36x$
* $f'''(x)=240x^{2}+36$

### Example 2

Find the 3rd derivative of $f(x)=12\sin(x)+{\frac {1}{x+2}}+2x$ with respect to $x$.
* $f'(x)=12\cos(x)-{\frac {1}{(x+2)^{2}}}+2$
* $f''(x)=-12\sin(x)+{\frac {2}{(x+2)^{3}}}$
* $f'''(x)=-12\cos(x)-{\frac {6}{(x+2)^{4}}}$

### Applications

For applications of the second derivative in finding a curve's concavity and points of inflection, see "Extrema and Points of Inflection" and "Extreme Value Theorem". For applications of higher order derivatives in physics, see the "Kinematics" section.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
# Calculus/Hyperbolic functions
## Theory

The independent variable of a hyperbolic function is called a hyperbolic angle. Just as the circular functions sine and cosine can be seen as projections from the unit circle to the axes, so the hyperbolic functions sinh and cosh are projections from a unit hyperbola to the axes.

## Definitions

The hyperbolic functions are defined in analogy with the trigonometric functions:
    $\sinh(x)={\frac {e^{x}-e^{-x}}{2}}$
    $\cosh(x)={\frac {e^{x}+e^{-x}}{2}}$
    $\tanh(x)={\frac {\sinh(x)}{\cosh(x)}}={\frac {e^{x}-e^{-x}}{e^{x}+e^{-x}}}$
The reciprocal functions csch, sech, coth are defined from these functions:
    ${\rm {csch}}(x)={\frac {1}{\sinh(x)}}$
    ${\rm {sech}}(x)={\frac {1}{\cosh(x)}}$
    $\coth(x)={\frac {1}{\tanh(x)}}$

## Some simple identities

    $\cosh ^{2}(x)-\sinh ^{2}(x)=1$
    $1-\tanh ^{2}(x)={\rm {sech}}^{2}(x)$
    $\sinh(2x)=2\sinh(x)\cosh(x)$
    $\cosh(2x)=\cosh ^{2}(x)+\sinh ^{2}(x)$

## Derivatives of hyperbolic functions

${\frac {d}{dx}}\sinh(x)=\cosh(x)$
${\frac {d}{dx}}\cosh(x)=\sinh(x)$
${\frac {d}{dx}}\tanh(x)={\rm {sech}}^{2}(x)$
${\frac {d}{dx}}{\rm {csch}}(x)=-{\rm {csch}}(x){\rm {coth}}(x)$
${\frac {d}{dx}}{\rm {sech}}(x)=-{\rm {sech}}(x)\tanh(x)$
${\frac {d}{dx}}{\rm {coth}}(x)=-{\rm {csch}}^{2}(x)$

## Principal values of the main hyperbolic functions

There is no problem in defining principal braches for sinh and tanh because they are injective. We choose one of the principal branches for cosh.
    $\sinh :\mathbb {R} \to \mathbb {R}$
    $\cosh :[0,\infty ]\to [1,\infty ]$
    $\tanh :\mathbb {R} \to (-1,1)$

## Inverse hyperbolic functions

With the principal values defined above, the definition of the inverse functions is immediate:
    ${\rm {arsinh:\mathbb {R} \to \mathbb {R} }}$
    ${\rm {arcosh:[1,\infty ]\to [0,\infty ]}}$
    ${\rm {artanh:(-1,1)\to \mathbb {R} }}$
We can define ${\rm {arcsch}}$ , ${\rm {arsech}}$ and ${\rm {arcoth}}$ similarly.
We can also write these inverses using the logarithm function,
    ${\rm {arsinh}}(x)=\ln {\bigx+{\sqrt {x^{2}+1}}{\big )}$
    ${\rm {arcosh}}(x)=\ln {\bigx+{\sqrt {x^{2}-1}}{\big )}$
    ${\rm {artanh}}(x)=\ln \left({\sqrt {\frac {1+x}{1-x}}}\right)$
These identities can simplify some integrals.

## Derivatives of inverse hyperbolic functions

${\frac {d}{dx}}{\rm {arsinh}}(x)={\frac {1}{\sqrt {1+x^{2}}}}$
${\frac {d}{dx}}{\rm {arcosh}}(x)={\frac {1}{\sqrt {x^{2}-1}}}\ ,\ x>1$
${\frac {d}{dx}}{\rm {artanh}}(x)={\frac {1}{1-x^{2}}}\ ,\ |x|<1$
${\frac {d}{dx}}{\rm {arcsch}}(x)=-{\frac {1}{|x|{\sqrt {1+x^{2}}}}}\ ,\ x\neq 0$
${\frac {d}{dx}}{\rm {arsech}}(x)=-{\frac {1}{x{\sqrt {1-x^{2}}}}}\ ,\ 0<x<1$
${\frac {d}{dx}}{\rm {arcoth}}(x)={\frac {1}{1-x^{2}}}\ ,\ |x|>1$

## Transcendental Functions

Hyperbolic functions are examples of transcendental functions -- they are not algebraic functions. They include trigonometric, inverse trigonometric, logarithmic and exponential functions.
# Calculus/Further Methods of Integration/Contents
## Review
### Basic Integration Rules

    See Calculus/Definite integral.
${\begin{aligned}&\int 0\,du=C\\&\int (k\cdot u)du=k\cdot \int u\,du+C\\&\int (u\pm v)du=\int u\,du\pm \int v\,du+C\end{aligned}}$

### Partial Integration

    See Calculus/Integration techniques/Integration by Parts.
For two functions $u$ and $dv$ of a variable $x$ ,
$\int u\,dv=uv-\int v\,du$
where $u$ is chosen by precedence according to LIPET:
* Logarithmic
* Inverse Trigonometric
* Polynomial
* Exponential
* Trigonometric

### Improper Integrals

    See Calculus/Improper Integrals.
For any function $f$ of variable $x$ , continuous on the given infinite domain:
${\begin{aligned}&\int \limits _{a}^{\infty }f(x)dx=\lim _{b\to \infty }\int \limits _{a}^{b}f(x)dx\\&\int \limits _{-\infty }^{b}f(x)dx=\lim _{a\to -\infty }\int \limits _{a}^{b}f(x)dx\\&\int \limits _{-\infty }^{\infty }f(x)dx=\int \limits _{-\infty }^{c}f(x)dx+\int \limits _{c}^{\infty }f(x)dx\end{aligned}}$
For any function $f$ of variable $x$ continuous on the given interval, but with an infinite discontinuity at (1) $a$ , (2) $b$ , or some (3) $c\in [a,b]$ :
${\begin{aligned}\int \limits _{a}^{b}f(x)dx&=\lim _{c\to b^{-}}\int \limits _{a}^{c}f(x)dx&(1)\\\int \limits _{a}^{b}f(x)dx&=\lim _{c\to a^{+}}\int \limits _{c}^{b}f(x)dx&(2)\\\int \limits _{a}^{b}f(x)dx&=\int \limits _{a}^{c}f(x)dx+\int \limits _{c}^{b}f(x)dx&(3)\end{aligned}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References