<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">infoschool</journal-id><journal-title-group><journal-title xml:lang="ru">Информатика в школе</journal-title><trans-title-group xml:lang="en"><trans-title>Informatics in school</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2221-1993</issn><publisher><publisher-name>Publishing House Education and Informatics</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.32517/2221-1993-2018-17-7-40-45</article-id><article-id custom-type="elpub" pub-id-type="custom">infoschool-288</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>ЗАДАЧИ</subject></subj-group></article-categories><title-group><article-title>ЭЛЕМЕНТЫ ФУНКЦИОНАЛЬНОГО ПРОГРАММИРОВАНИЯ НА ЯЗЫКЕ JAVASCRIPT:  ДВЕ ЗАДАЧИ ИЗ ТЕОРИИ ВЕРОЯТНОСТЕЙ</article-title><trans-title-group xml:lang="en"><trans-title>FUNCTIONAL STYLE PROGRAMMING IN JAVASCRIPT: TWO PROBABILITY PROBLEMS</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Травкин</surname><given-names>И. Ю.</given-names></name><name name-style="western" xml:lang="en"><surname>Travkin</surname><given-names>I. Yu.</given-names></name></name-alternatives><bio xml:lang="ru"><p>ст. преподаватель кафедры математики.</p><p>693008, Сахалинская область, г. Южно-Сахалинск, коммунистический пр-т, д. 33.</p></bio><bio xml:lang="en"><p>Yuzhno-Sakhalinsk.</p></bio><email xlink:type="simple">iwannt@gmail.com</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Сахалинский государственный университет.</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Sakhalin State University.</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2018</year></pub-date><pub-date pub-type="epub"><day>17</day><month>11</month><year>2018</year></pub-date><volume>0</volume><issue>7</issue><fpage>40</fpage><lpage>45</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Травкин И.Ю., 2018</copyright-statement><copyright-year>2018</copyright-year><copyright-holder xml:lang="ru">Травкин И.Ю.</copyright-holder><copyright-holder xml:lang="en">Travkin I.Y.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://school.infojournal.ru/jour/article/view/288">https://school.infojournal.ru/jour/article/view/288</self-uri><abstract><p>В статье подробно рассмотрены два примера составления программ в функциональном стиле, знакомство с которым является частью подготовки к решению современных задач обработки больших данных. Выбранные задачи, приведенный исходный код и объяснения автора могут служить материалом для одного или двух элективных занятий на соответствующую тему.</p></abstract><trans-abstract xml:lang="en"><p>The article contains detailed explanations for two examples of solving simple probability problems with simulations written in JavaScript using functional programming paradigm. Provided material is designed to be used in teaching introductory level of functional programming in upper secondary school.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>функциональное программирование</kwd><kwd>функциональный стиль</kwd><kwd>JavaScript</kwd><kwd>теория вероятностей</kwd><kwd>занимательные задачи</kwd></kwd-group><kwd-group xml:lang="en"><kwd>functional programming</kwd><kwd>functional style</kwd><kwd>JavaScript</kwd><kwd>probability theory</kwd><kwd>entertaining tasks</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Аль-Халили Дж. Парадокс. Девять великих загадок физики. СПб.: Питер, 2017.</mixed-citation><mixed-citation xml:lang="en">Аль-Халили Дж. Парадокс. Девять великих загадок физики. СПб.: Питер, 2017.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Стрелочные функции. https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Functions/Arrow_functions</mixed-citation><mixed-citation xml:lang="en">Стрелочные функции. https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Functions/Arrow_functions</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Array.prototype.filter(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/filter</mixed-citation><mixed-citation xml:lang="en">Array.prototype.filter(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/filter</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Array.prototype.map(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/map</mixed-citation><mixed-citation xml:lang="en">Array.prototype.map(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/map</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Array.prototype.reduce(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce</mixed-citation><mixed-citation xml:lang="en">Array.prototype.reduce(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Array.prototype.slice(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/slice</mixed-citation><mixed-citation xml:lang="en">Array.prototype.slice(). https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/slice</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Crockford D. The World’s Most Misunderstood Programming Language Has Become the World’s Most Popular Programming Language. https://www.crockford.com/javascript/popular.html</mixed-citation><mixed-citation xml:lang="en">Crockford D. The World’s Most Misunderstood Programming Language Has Become the World’s Most Popular Programming Language. https://www.crockford.com/javascript/popular.html</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Dean J., Ghemawat S. MapReduce: simplified data processing on large clusters // Communications of the ACM. 2008. N 51(1). https://www.usenix.org/legacy/publications/library/proceedings/osdi04/tech/full_papers/dean/dean_html/</mixed-citation><mixed-citation xml:lang="en">Dean J., Ghemawat S. MapReduce: simplified data processing on large clusters // Communications of the ACM. 2008. N 51(1). https://www.usenix.org/legacy/publications/library/proceedings/osdi04/tech/full_papers/dean/dean_html/</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Google Chrome Portable. https://portableapps.com/apps/ internet/google_chrome_portable</mixed-citation><mixed-citation xml:lang="en">Google Chrome Portable. https://portableapps.com/apps/ internet/google_chrome_portable</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Jang P. Modern JavaScript Explained For Dinosaurs. https://medium.com/the-node-js-collection/modern-javascriptexplained-for-dinosaurs-f695e9747b70</mixed-citation><mixed-citation xml:lang="en">Jang P. Modern JavaScript Explained For Dinosaurs. https://medium.com/the-node-js-collection/modern-javascriptexplained-for-dinosaurs-f695e9747b70</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Nakoryakov V. Two Years of Functional Programming in JavaScript: Lessons Learned. https://hackernoon.com/two-years-offunctional-programming-in-javascript-lessons-learned-1851667c726</mixed-citation><mixed-citation xml:lang="en">Nakoryakov V. Two Years of Functional Programming in JavaScript: Lessons Learned. https://hackernoon.com/two-years-offunctional-programming-in-javascript-lessons-learned-1851667c726</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Stat 110 on YouTube. https://projects.iq.harvard.edu/stat110/ youtube</mixed-citation><mixed-citation xml:lang="en">Stat 110 on YouTube. https://projects.iq.harvard.edu/stat110/ youtube</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
