├── .dockerignore ├── .editorconfig ├── .env.example ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bugreport.yml │ ├── featureRequest.yml │ └── task.yml ├── dependabot.yml └── workflows │ ├── master.yml │ ├── pull_request.yml │ └── solutions.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.yml ├── Dockerfile ├── Dockerfile.dev ├── LICENSE.md ├── Makefile ├── MyParseDown.php ├── Procfile ├── Procfile.dev ├── README.md ├── README.ru.md ├── app.json ├── app ├── Console │ ├── Commands │ │ └── GenerateSitemap.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Github │ ├── Github.php │ └── GithubInterface.php ├── Helpers │ ├── ChapterHelper.php │ ├── ChartHelper.php │ ├── ExerciseHelper.php │ ├── LocalizationHelper.php │ ├── MarkdownHelper.php │ ├── TemplateHelper.php │ └── helpers.php ├── Http │ ├── Controllers │ │ ├── ActivityController.php │ │ ├── Api │ │ │ ├── Exercise │ │ │ │ ├── CheckController.php │ │ │ │ └── SolutionController.php │ │ │ └── ExerciseController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ ├── Social │ │ │ │ └── GithubController.php │ │ │ └── VerificationController.php │ │ ├── Chapter │ │ │ └── ChapterMemberController.php │ │ ├── ChapterController.php │ │ ├── CommentController.php │ │ ├── Controller.php │ │ ├── ExerciseController.php │ │ ├── HomeController.php │ │ ├── MyController.php │ │ ├── PagesController.php │ │ ├── Rating │ │ │ ├── CommentController.php │ │ │ └── TopController.php │ │ ├── Settings │ │ │ ├── AccountController.php │ │ │ └── ProfileController.php │ │ ├── SitemapController.php │ │ ├── SolutionController.php │ │ ├── User │ │ │ ├── SolutionController.php │ │ │ └── UserCommentController.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── RedirectIfProduction.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ ├── Api │ │ │ └── Exercise │ │ │ │ ├── CheckSolutionRequest.php │ │ │ │ └── SaveSolutionRequest.php │ │ ├── CommentRequest.php │ │ └── User │ │ │ └── SaveChapterRequest.php │ └── Resources │ │ └── Api │ │ └── Exercise │ │ └── CheckResultResource.php ├── Models │ ├── Activity.php │ ├── Chapter.php │ ├── ChapterMember.php │ ├── Comment.php │ ├── Exercise.php │ ├── ExerciseMember.php │ ├── Solution.php │ └── User.php ├── Policies │ ├── CommentPolicy.php │ ├── SolutionPolicy.php │ └── UserPolicy.php ├── Presenters │ ├── ChapterPresenter.php │ ├── CommentPresenter.php │ ├── ExercisePresenter.php │ └── UserPresenter.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── CustomCrawlProfile.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Services │ ├── ActivityService.php │ ├── CheckResult.php │ ├── CommentsRatingCalculator.php │ ├── ExerciseService.php │ ├── RatingCalculator.php │ └── SolutionChecker.php └── View │ └── Components │ └── HreflangTags.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── activitylog.php ├── app.php ├── auth.php ├── breadcrumbs.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── github.php ├── google.php ├── hashing.php ├── laravellocalization.php ├── logging.php ├── mail.php ├── queue.php ├── scramble.php ├── sentry.php ├── services.php ├── session.php ├── sitemap.php ├── state-machine.php ├── view.php └── yandex.php ├── database ├── .gitignore ├── chapters.yml ├── exercises.yml ├── factories │ ├── ChapterMemberFactory.php │ ├── CommentFactory.php │ ├── ExerciseMemberFactory.php │ ├── SolutionFactory.php │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_31_054447_create_chapters.php │ ├── 2019_09_04_211829_create_read_chapters_table.php │ ├── 2019_09_21_220841_add_parent_id_to_chapters_table.php │ ├── 2019_11_18_110908_add_soft_deletes_to_user_table.php │ ├── 2019_12_06_143659_create_activity_log_table.php │ ├── 2019_12_15_112017_create_exercises_table.php │ ├── 2020_02_07_223934_create_comments_table.php │ ├── 2020_03_08_155929_create_completed_exercises_table.php │ ├── 2020_05_31_081646_add_origin_link_to_exercises_table.php │ ├── 2020_05_31_102920_drop_link_column_exercise_table.php │ ├── 2020_06_19_155156_create_solutions_table.php │ ├── 2020_10_04_083046_add_github_name_to_user_table.php │ ├── 2020_12_08_141654_add_hexlet_nickname_to_user_table.php │ ├── 2021_05_13_170611_add_event_column_to_activity_log_table.php │ ├── 2021_05_13_170612_add_batch_uuid_column_to_activity_log_table.php │ ├── 2022_03_18_132114_delete_comments_without_user.php │ ├── 2023_01_21_074508_add_state_for_user_exercise.php │ ├── 2023_01_21_103156_rename_completed_exercises_to_exercise_members.php │ ├── 2023_06_17_063047_update_subject_in_activity_log_table.php │ ├── 2024_03_22_160412_rename_read_chapters_to_chapter_members.php │ ├── 2024_03_22_160627_add_to_chapter_member_state_column.php │ ├── 2024_03_26_174007_rename_added_activity_log_event_to_multiple_chapters_added.php │ ├── 2024_03_27_174229_add_points_to_user.php │ └── 2024_03_28_104056_fix_points_of_users.php └── seeders │ ├── ChapterMembersTableSeeder.php │ ├── ChaptersTableSeeder.php │ ├── CommentsTableSeeder.php │ ├── DatabaseSeeder.php │ ├── ExerciseMembersTableSeeder.php │ ├── ExercisesTableSeeder.php │ ├── SolutionsTableSeeder.php │ └── UsersTableSeeder.php ├── design ├── README.md ├── index.html └── logo-02.png ├── docker-compose.ci.yml ├── docker-compose.yml ├── docs ├── .gitkeep └── .keep ├── eslint.config.js ├── make-compose.mk ├── nginx.conf ├── package-lock.json ├── package.json ├── phpcs.xml ├── phpmd.xml ├── phpstan.neon ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── icons │ ├── flags │ │ ├── en.svg │ │ └── ru.svg │ └── octoface.svg ├── index.php ├── robots.txt ├── web.config └── yandex_7b3f1e2c1757ecf0.html ├── pull_request_template.md ├── resources ├── assets │ └── images │ │ ├── Patchouli_Gives_SICP.png │ │ ├── advice_dog.jpg │ │ ├── exercises │ │ ├── 1_29.gif │ │ ├── 2_24.gif │ │ ├── 2_34_1.gif │ │ ├── 2_34_2.gif │ │ ├── 2_37.gif │ │ ├── 2_42.gif │ │ ├── 2_52_1.gif │ │ ├── 2_52_2.gif │ │ ├── 2_56.gif │ │ ├── 2_63.gif │ │ ├── 2_77.gif │ │ ├── 2_83.gif │ │ ├── 2_91.gif │ │ ├── 3_30.gif │ │ ├── 3_38.gif │ │ ├── 3_43.gif │ │ ├── 3_59_1.gif │ │ ├── 3_59_2.gif │ │ ├── 3_61.gif │ │ ├── 3_65.gif │ │ ├── 3_73_1.gif │ │ ├── 3_73_2.gif │ │ ├── 3_78_1.gif │ │ ├── 3_78_2.gif │ │ ├── 3_80_1.gif │ │ ├── 3_80_2.gif │ │ ├── 3_80_3.gif │ │ ├── 3_80_4.gif │ │ ├── 3_80_5.gif │ │ ├── 4_76.gif │ │ ├── 5_12.gif │ │ ├── 5_14.gif │ │ ├── 5_20.gif │ │ └── 5_27.gif │ │ ├── hexlet_logo.png │ │ ├── logo-en.svg │ │ ├── logo-ru.svg │ │ ├── logo.png │ │ ├── sicp_cover.jpg │ │ └── waiting_clock.png ├── chapter-links.php ├── exercise-links.php ├── js │ ├── app.js │ ├── common │ │ ├── checkStatusMap.js │ │ ├── codeTemplates.js │ │ ├── currentTheme.js │ │ ├── hashLocationMap.js │ │ ├── routes.js │ │ ├── tabNameKeysMap.js │ │ └── tabNamesMap.js │ ├── components │ │ ├── App.jsx │ │ ├── ControlBox.jsx │ │ ├── Editor.jsx │ │ ├── EditorBuilder.jsx │ │ ├── Output.jsx │ │ ├── TabsBox.jsx │ │ ├── TeacherSolution.jsx │ │ ├── Tests.jsx │ │ ├── index.js │ │ ├── init.jsx │ │ └── store.js │ ├── context │ │ ├── ExerciseIdContext.js │ │ └── UserIdContext.js │ ├── correction.js │ ├── custom.js │ ├── editor.js │ ├── hljs.js │ ├── locales │ │ ├── en.js │ │ ├── index.js │ │ └── ru.js │ └── slices │ │ ├── checkResultSlice.js │ │ ├── editorSlice.js │ │ ├── exerciseInfoSlice.js │ │ ├── notificationSlice.js │ │ └── tabsBoxSlice.js ├── lang │ ├── en │ │ ├── account.php │ │ ├── activityChart.php │ │ ├── activitylog.php │ │ ├── auth.php │ │ ├── breadcrumb.php │ │ ├── chapter.php │ │ ├── comment.php │ │ ├── console.php │ │ ├── errors.php │ │ ├── exercise.php │ │ ├── exercises │ │ │ ├── 1_1.php │ │ │ ├── 1_10.php │ │ │ ├── 1_11.php │ │ │ ├── 1_12.php │ │ │ ├── 1_13.php │ │ │ ├── 1_14.php │ │ │ ├── 1_15.php │ │ │ ├── 1_16.php │ │ │ ├── 1_17.php │ │ │ ├── 1_18.php │ │ │ ├── 1_19.php │ │ │ ├── 1_2.php │ │ │ ├── 1_20.php │ │ │ ├── 1_21.php │ │ │ ├── 1_22.php │ │ │ ├── 1_23.php │ │ │ ├── 1_24.php │ │ │ ├── 1_25.php │ │ │ ├── 1_26.php │ │ │ ├── 1_27.php │ │ │ ├── 1_28.php │ │ │ ├── 1_29.php │ │ │ ├── 1_3.php │ │ │ ├── 1_30.php │ │ │ ├── 1_31.php │ │ │ ├── 1_32.php │ │ │ ├── 1_33.php │ │ │ ├── 1_34.php │ │ │ ├── 1_35.php │ │ │ ├── 1_36.php │ │ │ ├── 1_37.php │ │ │ ├── 1_38.php │ │ │ ├── 1_39.php │ │ │ ├── 1_4.php │ │ │ ├── 1_40.php │ │ │ ├── 1_41.php │ │ │ ├── 1_42.php │ │ │ ├── 1_43.php │ │ │ ├── 1_44.php │ │ │ ├── 1_45.php │ │ │ ├── 1_46.php │ │ │ ├── 1_5.php │ │ │ ├── 1_6.php │ │ │ ├── 1_7.php │ │ │ ├── 1_8.php │ │ │ ├── 1_9.php │ │ │ ├── 2_1.php │ │ │ ├── 2_10.php │ │ │ ├── 2_11.php │ │ │ ├── 2_12.php │ │ │ ├── 2_13.php │ │ │ ├── 2_14.php │ │ │ ├── 2_15.php │ │ │ ├── 2_16.php │ │ │ ├── 2_17.php │ │ │ ├── 2_18.php │ │ │ ├── 2_19.php │ │ │ ├── 2_2.php │ │ │ ├── 2_20.php │ │ │ ├── 2_21.php │ │ │ ├── 2_22.php │ │ │ ├── 2_23.php │ │ │ ├── 2_24.php │ │ │ ├── 2_25.php │ │ │ ├── 2_26.php │ │ │ ├── 2_27.php │ │ │ ├── 2_28.php │ │ │ ├── 2_29.php │ │ │ ├── 2_3.php │ │ │ ├── 2_30.php │ │ │ ├── 2_31.php │ │ │ ├── 2_32.php │ │ │ ├── 2_33.php │ │ │ ├── 2_34.php │ │ │ ├── 2_35.php │ │ │ ├── 2_36.php │ │ │ ├── 2_37.php │ │ │ ├── 2_38.php │ │ │ ├── 2_39.php │ │ │ ├── 2_4.php │ │ │ ├── 2_40.php │ │ │ ├── 2_41.php │ │ │ ├── 2_42.php │ │ │ ├── 2_43.php │ │ │ ├── 2_44.php │ │ │ ├── 2_45.php │ │ │ ├── 2_46.php │ │ │ ├── 2_47.php │ │ │ ├── 2_48.php │ │ │ ├── 2_49.php │ │ │ ├── 2_5.php │ │ │ ├── 2_50.php │ │ │ ├── 2_51.php │ │ │ ├── 2_52.php │ │ │ ├── 2_53.php │ │ │ ├── 2_54.php │ │ │ ├── 2_55.php │ │ │ ├── 2_56.php │ │ │ ├── 2_57.php │ │ │ ├── 2_58.php │ │ │ ├── 2_59.php │ │ │ ├── 2_6.php │ │ │ ├── 2_60.php │ │ │ ├── 2_61.php │ │ │ ├── 2_62.php │ │ │ ├── 2_63.php │ │ │ ├── 2_64.php │ │ │ ├── 2_65.php │ │ │ ├── 2_66.php │ │ │ ├── 2_67.php │ │ │ ├── 2_68.php │ │ │ ├── 2_69.php │ │ │ ├── 2_7.php │ │ │ ├── 2_70.php │ │ │ ├── 2_71.php │ │ │ ├── 2_72.php │ │ │ ├── 2_73.php │ │ │ ├── 2_74.php │ │ │ ├── 2_75.php │ │ │ ├── 2_76.php │ │ │ ├── 2_77.php │ │ │ ├── 2_78.php │ │ │ ├── 2_79.php │ │ │ ├── 2_8.php │ │ │ ├── 2_80.php │ │ │ ├── 2_81.php │ │ │ ├── 2_82.php │ │ │ ├── 2_83.php │ │ │ ├── 2_84.php │ │ │ ├── 2_85.php │ │ │ ├── 2_86.php │ │ │ ├── 2_87.php │ │ │ ├── 2_88.php │ │ │ ├── 2_89.php │ │ │ ├── 2_9.php │ │ │ ├── 2_90.php │ │ │ ├── 2_91.php │ │ │ ├── 2_92.php │ │ │ ├── 2_93.php │ │ │ ├── 2_94.php │ │ │ ├── 2_95.php │ │ │ ├── 2_96.php │ │ │ ├── 2_97.php │ │ │ ├── 3_1.php │ │ │ ├── 3_10.php │ │ │ ├── 3_11.php │ │ │ ├── 3_12.php │ │ │ ├── 3_13.php │ │ │ ├── 3_14.php │ │ │ ├── 3_15.php │ │ │ ├── 3_16.php │ │ │ ├── 3_17.php │ │ │ ├── 3_18.php │ │ │ ├── 3_19.php │ │ │ ├── 3_2.php │ │ │ ├── 3_20.php │ │ │ ├── 3_21.php │ │ │ ├── 3_22.php │ │ │ ├── 3_23.php │ │ │ ├── 3_24.php │ │ │ ├── 3_25.php │ │ │ ├── 3_26.php │ │ │ ├── 3_27.php │ │ │ ├── 3_28.php │ │ │ ├── 3_29.php │ │ │ ├── 3_3.php │ │ │ ├── 3_30.php │ │ │ ├── 3_31.php │ │ │ ├── 3_32.php │ │ │ ├── 3_33.php │ │ │ ├── 3_34.php │ │ │ ├── 3_35.php │ │ │ ├── 3_36.php │ │ │ ├── 3_37.php │ │ │ ├── 3_38.php │ │ │ ├── 3_39.php │ │ │ ├── 3_4.php │ │ │ ├── 3_40.php │ │ │ ├── 3_41.php │ │ │ ├── 3_42.php │ │ │ ├── 3_43.php │ │ │ ├── 3_44.php │ │ │ ├── 3_45.php │ │ │ ├── 3_46.php │ │ │ ├── 3_47.php │ │ │ ├── 3_48.php │ │ │ ├── 3_49.php │ │ │ ├── 3_5.php │ │ │ ├── 3_50.php │ │ │ ├── 3_51.php │ │ │ ├── 3_52.php │ │ │ ├── 3_53.php │ │ │ ├── 3_54.php │ │ │ ├── 3_55.php │ │ │ ├── 3_56.php │ │ │ ├── 3_57.php │ │ │ ├── 3_58.php │ │ │ ├── 3_59.php │ │ │ ├── 3_6.php │ │ │ ├── 3_60.php │ │ │ ├── 3_61.php │ │ │ ├── 3_62.php │ │ │ ├── 3_63.php │ │ │ ├── 3_64.php │ │ │ ├── 3_65.php │ │ │ ├── 3_66.php │ │ │ ├── 3_67.php │ │ │ ├── 3_68.php │ │ │ ├── 3_69.php │ │ │ ├── 3_7.php │ │ │ ├── 3_70.php │ │ │ ├── 3_71.php │ │ │ ├── 3_72.php │ │ │ ├── 3_73.php │ │ │ ├── 3_74.php │ │ │ ├── 3_75.php │ │ │ ├── 3_76.php │ │ │ ├── 3_77.php │ │ │ ├── 3_78.php │ │ │ ├── 3_79.php │ │ │ ├── 3_8.php │ │ │ ├── 3_80.php │ │ │ ├── 3_81.php │ │ │ ├── 3_82.php │ │ │ ├── 3_9.php │ │ │ ├── 4_1.php │ │ │ ├── 4_10.php │ │ │ ├── 4_11.php │ │ │ ├── 4_12.php │ │ │ ├── 4_13.php │ │ │ ├── 4_14.php │ │ │ ├── 4_15.php │ │ │ ├── 4_16.php │ │ │ ├── 4_17.php │ │ │ ├── 4_18.php │ │ │ ├── 4_19.php │ │ │ ├── 4_2.php │ │ │ ├── 4_20.php │ │ │ ├── 4_21.php │ │ │ ├── 4_22.php │ │ │ ├── 4_23.php │ │ │ ├── 4_24.php │ │ │ ├── 4_25.php │ │ │ ├── 4_26.php │ │ │ ├── 4_27.php │ │ │ ├── 4_28.php │ │ │ ├── 4_29.php │ │ │ ├── 4_3.php │ │ │ ├── 4_30.php │ │ │ ├── 4_31.php │ │ │ ├── 4_32.php │ │ │ ├── 4_33.php │ │ │ ├── 4_34.php │ │ │ ├── 4_35.php │ │ │ ├── 4_36.php │ │ │ ├── 4_37.php │ │ │ ├── 4_38.php │ │ │ ├── 4_39.php │ │ │ ├── 4_4.php │ │ │ ├── 4_40.php │ │ │ ├── 4_41.php │ │ │ ├── 4_42.php │ │ │ ├── 4_43.php │ │ │ ├── 4_44.php │ │ │ ├── 4_45.php │ │ │ ├── 4_46.php │ │ │ ├── 4_47.php │ │ │ ├── 4_48.php │ │ │ ├── 4_49.php │ │ │ ├── 4_5.php │ │ │ ├── 4_50.php │ │ │ ├── 4_51.php │ │ │ ├── 4_52.php │ │ │ ├── 4_53.php │ │ │ ├── 4_54.php │ │ │ ├── 4_55.php │ │ │ ├── 4_56.php │ │ │ ├── 4_57.php │ │ │ ├── 4_58.php │ │ │ ├── 4_59.php │ │ │ ├── 4_6.php │ │ │ ├── 4_60.php │ │ │ ├── 4_61.php │ │ │ ├── 4_62.php │ │ │ ├── 4_63.php │ │ │ ├── 4_64.php │ │ │ ├── 4_65.php │ │ │ ├── 4_66.php │ │ │ ├── 4_67.php │ │ │ ├── 4_68.php │ │ │ ├── 4_69.php │ │ │ ├── 4_7.php │ │ │ ├── 4_70.php │ │ │ ├── 4_71.php │ │ │ ├── 4_72.php │ │ │ ├── 4_73.php │ │ │ ├── 4_74.php │ │ │ ├── 4_75.php │ │ │ ├── 4_76.php │ │ │ ├── 4_77.php │ │ │ ├── 4_78.php │ │ │ ├── 4_79.php │ │ │ ├── 4_8.php │ │ │ ├── 4_9.php │ │ │ ├── 5_1.php │ │ │ ├── 5_10.php │ │ │ ├── 5_11.php │ │ │ ├── 5_12.php │ │ │ ├── 5_13.php │ │ │ ├── 5_14.php │ │ │ ├── 5_15.php │ │ │ ├── 5_16.php │ │ │ ├── 5_17.php │ │ │ ├── 5_18.php │ │ │ ├── 5_19.php │ │ │ ├── 5_2.php │ │ │ ├── 5_20.php │ │ │ ├── 5_21.php │ │ │ ├── 5_22.php │ │ │ ├── 5_23.php │ │ │ ├── 5_24.php │ │ │ ├── 5_25.php │ │ │ ├── 5_26.php │ │ │ ├── 5_27.php │ │ │ ├── 5_28.php │ │ │ ├── 5_29.php │ │ │ ├── 5_3.php │ │ │ ├── 5_30.php │ │ │ ├── 5_31.php │ │ │ ├── 5_32.php │ │ │ ├── 5_33.php │ │ │ ├── 5_34.php │ │ │ ├── 5_35.php │ │ │ ├── 5_36.php │ │ │ ├── 5_37.php │ │ │ ├── 5_38.php │ │ │ ├── 5_39.php │ │ │ ├── 5_4.php │ │ │ ├── 5_40.php │ │ │ ├── 5_41.php │ │ │ ├── 5_42.php │ │ │ ├── 5_43.php │ │ │ ├── 5_44.php │ │ │ ├── 5_45.php │ │ │ ├── 5_46.php │ │ │ ├── 5_47.php │ │ │ ├── 5_48.php │ │ │ ├── 5_49.php │ │ │ ├── 5_5.php │ │ │ ├── 5_50.php │ │ │ ├── 5_51.php │ │ │ ├── 5_52.php │ │ │ ├── 5_6.php │ │ │ ├── 5_7.php │ │ │ ├── 5_8.php │ │ │ └── 5_9.php │ │ ├── landing.php │ │ ├── layout.php │ │ ├── login.php │ │ ├── my.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ ├── progresses.php │ │ ├── rating.php │ │ ├── register.php │ │ ├── settings.php │ │ ├── sicp.php │ │ ├── solution.php │ │ ├── user.php │ │ ├── validation.php │ │ ├── views.php │ │ └── welcome.php │ └── ru │ │ ├── about.php │ │ ├── account.php │ │ ├── activityChart.php │ │ ├── activitylog.php │ │ ├── auth.php │ │ ├── breadcrumb.php │ │ ├── chapter.php │ │ ├── comment.php │ │ ├── errors.php │ │ ├── exercise.php │ │ ├── exercises │ │ ├── 1_1.php │ │ ├── 1_10.php │ │ ├── 1_11.php │ │ ├── 1_12.php │ │ ├── 1_13.php │ │ ├── 1_14.php │ │ ├── 1_15.php │ │ ├── 1_16.php │ │ ├── 1_17.php │ │ ├── 1_18.php │ │ ├── 1_19.php │ │ ├── 1_2.php │ │ ├── 1_20.php │ │ ├── 1_21.php │ │ ├── 1_22.php │ │ ├── 1_23.php │ │ ├── 1_24.php │ │ ├── 1_25.php │ │ ├── 1_26.php │ │ ├── 1_27.php │ │ ├── 1_28.php │ │ ├── 1_29.php │ │ ├── 1_3.php │ │ ├── 1_30.php │ │ ├── 1_31.php │ │ ├── 1_32.php │ │ ├── 1_33.php │ │ ├── 1_34.php │ │ ├── 1_35.php │ │ ├── 1_36.php │ │ ├── 1_37.php │ │ ├── 1_38.php │ │ ├── 1_39.php │ │ ├── 1_4.php │ │ ├── 1_40.php │ │ ├── 1_41.php │ │ ├── 1_42.php │ │ ├── 1_43.php │ │ ├── 1_44.php │ │ ├── 1_45.php │ │ ├── 1_46.php │ │ ├── 1_5.php │ │ ├── 1_6.php │ │ ├── 1_7.php │ │ ├── 1_8.php │ │ ├── 1_9.php │ │ ├── 2_1.php │ │ ├── 2_10.php │ │ ├── 2_11.php │ │ ├── 2_12.php │ │ ├── 2_13.php │ │ ├── 2_14.php │ │ ├── 2_15.php │ │ ├── 2_16.php │ │ ├── 2_17.php │ │ ├── 2_18.php │ │ ├── 2_19.php │ │ ├── 2_2.php │ │ ├── 2_20.php │ │ ├── 2_21.php │ │ ├── 2_22.php │ │ ├── 2_23.php │ │ ├── 2_24.php │ │ ├── 2_25.php │ │ ├── 2_26.php │ │ ├── 2_27.php │ │ ├── 2_28.php │ │ ├── 2_29.php │ │ ├── 2_3.php │ │ ├── 2_30.php │ │ ├── 2_31.php │ │ ├── 2_32.php │ │ ├── 2_33.php │ │ ├── 2_34.php │ │ ├── 2_35.php │ │ ├── 2_36.php │ │ ├── 2_37.php │ │ ├── 2_38.php │ │ ├── 2_39.php │ │ ├── 2_4.php │ │ ├── 2_40.php │ │ ├── 2_41.php │ │ ├── 2_42.php │ │ ├── 2_43.php │ │ ├── 2_44.php │ │ ├── 2_45.php │ │ ├── 2_46.php │ │ ├── 2_47.php │ │ ├── 2_48.php │ │ ├── 2_49.php │ │ ├── 2_5.php │ │ ├── 2_50.php │ │ ├── 2_51.php │ │ ├── 2_52.php │ │ ├── 2_53.php │ │ ├── 2_54.php │ │ ├── 2_55.php │ │ ├── 2_56.php │ │ ├── 2_57.php │ │ ├── 2_58.php │ │ ├── 2_59.php │ │ ├── 2_6.php │ │ ├── 2_60.php │ │ ├── 2_61.php │ │ ├── 2_62.php │ │ ├── 2_63.php │ │ ├── 2_64.php │ │ ├── 2_65.php │ │ ├── 2_66.php │ │ ├── 2_67.php │ │ ├── 2_68.php │ │ ├── 2_69.php │ │ ├── 2_7.php │ │ ├── 2_70.php │ │ ├── 2_71.php │ │ ├── 2_72.php │ │ ├── 2_73.php │ │ ├── 2_74.php │ │ ├── 2_75.php │ │ ├── 2_76.php │ │ ├── 2_77.php │ │ ├── 2_78.php │ │ ├── 2_79.php │ │ ├── 2_8.php │ │ ├── 2_80.php │ │ ├── 2_81.php │ │ ├── 2_82.php │ │ ├── 2_83.php │ │ ├── 2_84.php │ │ ├── 2_85.php │ │ ├── 2_86.php │ │ ├── 2_87.php │ │ ├── 2_88.php │ │ ├── 2_89.php │ │ ├── 2_9.php │ │ ├── 2_90.php │ │ ├── 2_91.php │ │ ├── 2_92.php │ │ ├── 2_93.php │ │ ├── 2_94.php │ │ ├── 2_95.php │ │ ├── 2_96.php │ │ ├── 2_97.php │ │ ├── 3_1.php │ │ ├── 3_10.php │ │ ├── 3_11.php │ │ ├── 3_12.php │ │ ├── 3_13.php │ │ ├── 3_14.php │ │ ├── 3_15.php │ │ ├── 3_16.php │ │ ├── 3_17.php │ │ ├── 3_18.php │ │ ├── 3_19.php │ │ ├── 3_2.php │ │ ├── 3_20.php │ │ ├── 3_21.php │ │ ├── 3_22.php │ │ ├── 3_23.php │ │ ├── 3_24.php │ │ ├── 3_25.php │ │ ├── 3_26.php │ │ ├── 3_27.php │ │ ├── 3_28.php │ │ ├── 3_29.php │ │ ├── 3_3.php │ │ ├── 3_30.php │ │ ├── 3_31.php │ │ ├── 3_32.php │ │ ├── 3_33.php │ │ ├── 3_34.php │ │ ├── 3_35.php │ │ ├── 3_36.php │ │ ├── 3_37.php │ │ ├── 3_38.php │ │ ├── 3_39.php │ │ ├── 3_4.php │ │ ├── 3_40.php │ │ ├── 3_41.php │ │ ├── 3_42.php │ │ ├── 3_43.php │ │ ├── 3_44.php │ │ ├── 3_45.php │ │ ├── 3_46.php │ │ ├── 3_47.php │ │ ├── 3_48.php │ │ ├── 3_49.php │ │ ├── 3_5.php │ │ ├── 3_50.php │ │ ├── 3_51.php │ │ ├── 3_52.php │ │ ├── 3_53.php │ │ ├── 3_54.php │ │ ├── 3_55.php │ │ ├── 3_56.php │ │ ├── 3_57.php │ │ ├── 3_58.php │ │ ├── 3_59.php │ │ ├── 3_6.php │ │ ├── 3_60.php │ │ ├── 3_61.php │ │ ├── 3_62.php │ │ ├── 3_63.php │ │ ├── 3_64.php │ │ ├── 3_65.php │ │ ├── 3_66.php │ │ ├── 3_67.php │ │ ├── 3_68.php │ │ ├── 3_69.php │ │ ├── 3_7.php │ │ ├── 3_70.php │ │ ├── 3_71.php │ │ ├── 3_72.php │ │ ├── 3_73.php │ │ ├── 3_74.php │ │ ├── 3_75.php │ │ ├── 3_76.php │ │ ├── 3_77.php │ │ ├── 3_78.php │ │ ├── 3_79.php │ │ ├── 3_8.php │ │ ├── 3_80.php │ │ ├── 3_81.php │ │ ├── 3_82.php │ │ ├── 3_9.php │ │ ├── 4_1.php │ │ ├── 4_10.php │ │ ├── 4_11.php │ │ ├── 4_12.php │ │ ├── 4_13.php │ │ ├── 4_14.php │ │ ├── 4_15.php │ │ ├── 4_16.php │ │ ├── 4_17.php │ │ ├── 4_18.php │ │ ├── 4_19.php │ │ ├── 4_2.php │ │ ├── 4_20.php │ │ ├── 4_21.php │ │ ├── 4_22.php │ │ ├── 4_23.php │ │ ├── 4_24.php │ │ ├── 4_25.php │ │ ├── 4_26.php │ │ ├── 4_27.php │ │ ├── 4_28.php │ │ ├── 4_29.php │ │ ├── 4_3.php │ │ ├── 4_30.php │ │ ├── 4_31.php │ │ ├── 4_32.php │ │ ├── 4_33.php │ │ ├── 4_34.php │ │ ├── 4_35.php │ │ ├── 4_36.php │ │ ├── 4_37.php │ │ ├── 4_38.php │ │ ├── 4_39.php │ │ ├── 4_4.php │ │ ├── 4_40.php │ │ ├── 4_41.php │ │ ├── 4_42.php │ │ ├── 4_43.php │ │ ├── 4_44.php │ │ ├── 4_45.php │ │ ├── 4_46.php │ │ ├── 4_47.php │ │ ├── 4_48.php │ │ ├── 4_49.php │ │ ├── 4_5.php │ │ ├── 4_50.php │ │ ├── 4_51.php │ │ ├── 4_52.php │ │ ├── 4_53.php │ │ ├── 4_54.php │ │ ├── 4_55.php │ │ ├── 4_56.php │ │ ├── 4_57.php │ │ ├── 4_58.php │ │ ├── 4_59.php │ │ ├── 4_6.php │ │ ├── 4_60.php │ │ ├── 4_61.php │ │ ├── 4_62.php │ │ ├── 4_63.php │ │ ├── 4_64.php │ │ ├── 4_65.php │ │ ├── 4_66.php │ │ ├── 4_67.php │ │ ├── 4_68.php │ │ ├── 4_69.php │ │ ├── 4_7.php │ │ ├── 4_70.php │ │ ├── 4_71.php │ │ ├── 4_72.php │ │ ├── 4_73.php │ │ ├── 4_74.php │ │ ├── 4_75.php │ │ ├── 4_76.php │ │ ├── 4_77.php │ │ ├── 4_78.php │ │ ├── 4_79.php │ │ ├── 4_8.php │ │ ├── 4_9.php │ │ ├── 5_1.php │ │ ├── 5_10.php │ │ ├── 5_11.php │ │ ├── 5_12.php │ │ ├── 5_13.php │ │ ├── 5_14.php │ │ ├── 5_15.php │ │ ├── 5_16.php │ │ ├── 5_17.php │ │ ├── 5_18.php │ │ ├── 5_19.php │ │ ├── 5_2.php │ │ ├── 5_20.php │ │ ├── 5_21.php │ │ ├── 5_22.php │ │ ├── 5_23.php │ │ ├── 5_24.php │ │ ├── 5_25.php │ │ ├── 5_26.php │ │ ├── 5_27.php │ │ ├── 5_28.php │ │ ├── 5_29.php │ │ ├── 5_3.php │ │ ├── 5_30.php │ │ ├── 5_31.php │ │ ├── 5_32.php │ │ ├── 5_33.php │ │ ├── 5_34.php │ │ ├── 5_35.php │ │ ├── 5_36.php │ │ ├── 5_37.php │ │ ├── 5_38.php │ │ ├── 5_39.php │ │ ├── 5_4.php │ │ ├── 5_40.php │ │ ├── 5_41.php │ │ ├── 5_42.php │ │ ├── 5_43.php │ │ ├── 5_44.php │ │ ├── 5_45.php │ │ ├── 5_46.php │ │ ├── 5_47.php │ │ ├── 5_48.php │ │ ├── 5_49.php │ │ ├── 5_5.php │ │ ├── 5_50.php │ │ ├── 5_51.php │ │ ├── 5_52.php │ │ ├── 5_6.php │ │ ├── 5_7.php │ │ ├── 5_8.php │ │ └── 5_9.php │ │ ├── landing.php │ │ ├── layout.php │ │ ├── login.php │ │ ├── my.php │ │ ├── passwords.php │ │ ├── progresses.php │ │ ├── rating.php │ │ ├── register.php │ │ ├── settings.php │ │ ├── sicp.php │ │ ├── solution.php │ │ ├── user.php │ │ ├── validation.php │ │ ├── views.php │ │ └── welcome.php ├── sass │ ├── _activity_chart.scss │ ├── _breakpoints.scss │ ├── _custom.scss │ ├── _icons.scss │ ├── _variables.scss │ └── app.scss └── views │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── chapter │ ├── index.blade.php │ ├── list.blade.php │ └── show.blade.php │ ├── comment │ └── index.blade.php │ ├── components │ ├── activity_chart.blade.php │ ├── bs │ │ └── form │ │ │ ├── checkbox.blade.php │ │ │ ├── email.blade.php │ │ │ ├── password.blade.php │ │ │ ├── submit.blade.php │ │ │ └── text.blade.php │ ├── comment │ │ ├── _comment.blade.php │ │ ├── _form.blade.php │ │ ├── _modal.blade.php │ │ └── reply │ │ │ └── _modal.blade.php │ ├── comments.blade.php │ ├── hreflang_tags.blade.php │ ├── solution.blade.php │ └── sorting_widget.blade.php │ ├── errors │ └── 404.blade.php │ ├── exercise │ ├── _modal │ │ └── completed_by.blade.php │ ├── index.blade.php │ ├── listing │ │ ├── 1_1.blade.php │ │ ├── 1_10.blade.php │ │ ├── 1_11.blade.php │ │ ├── 1_12.blade.php │ │ ├── 1_13.blade.php │ │ ├── 1_14.blade.php │ │ ├── 1_15.blade.php │ │ ├── 1_16.blade.php │ │ ├── 1_17.blade.php │ │ ├── 1_18.blade.php │ │ ├── 1_19.blade.php │ │ ├── 1_2.blade.php │ │ ├── 1_20.blade.php │ │ ├── 1_21.blade.php │ │ ├── 1_22.blade.php │ │ ├── 1_23.blade.php │ │ ├── 1_24.blade.php │ │ ├── 1_25.blade.php │ │ ├── 1_26.blade.php │ │ ├── 1_27.blade.php │ │ ├── 1_28.blade.php │ │ ├── 1_29.blade.php │ │ ├── 1_3.blade.php │ │ ├── 1_30.blade.php │ │ ├── 1_31.blade.php │ │ ├── 1_32.blade.php │ │ ├── 1_33.blade.php │ │ ├── 1_34.blade.php │ │ ├── 1_35.blade.php │ │ ├── 1_36.blade.php │ │ ├── 1_37.blade.php │ │ ├── 1_38.blade.php │ │ ├── 1_39.blade.php │ │ ├── 1_4.blade.php │ │ ├── 1_40.blade.php │ │ ├── 1_41.blade.php │ │ ├── 1_42.blade.php │ │ ├── 1_43.blade.php │ │ ├── 1_44.blade.php │ │ ├── 1_45.blade.php │ │ ├── 1_46.blade.php │ │ ├── 1_5.blade.php │ │ ├── 1_6.blade.php │ │ ├── 1_7.blade.php │ │ ├── 1_8.blade.php │ │ ├── 1_9.blade.php │ │ ├── 2_1.blade.php │ │ ├── 2_10.blade.php │ │ ├── 2_11.blade.php │ │ ├── 2_12.blade.php │ │ ├── 2_13.blade.php │ │ ├── 2_14.blade.php │ │ ├── 2_15.blade.php │ │ ├── 2_16.blade.php │ │ ├── 2_17.blade.php │ │ ├── 2_18.blade.php │ │ ├── 2_19.blade.php │ │ ├── 2_2.blade.php │ │ ├── 2_20.blade.php │ │ ├── 2_21.blade.php │ │ ├── 2_22.blade.php │ │ ├── 2_23.blade.php │ │ ├── 2_24.blade.php │ │ ├── 2_25.blade.php │ │ ├── 2_26.blade.php │ │ ├── 2_27.blade.php │ │ ├── 2_28.blade.php │ │ ├── 2_29.blade.php │ │ ├── 2_3.blade.php │ │ ├── 2_30.blade.php │ │ ├── 2_31.blade.php │ │ ├── 2_32.blade.php │ │ ├── 2_33.blade.php │ │ ├── 2_34.blade.php │ │ ├── 2_35.blade.php │ │ ├── 2_36.blade.php │ │ ├── 2_37.blade.php │ │ ├── 2_38.blade.php │ │ ├── 2_39.blade.php │ │ ├── 2_4.blade.php │ │ ├── 2_40.blade.php │ │ ├── 2_41.blade.php │ │ ├── 2_42.blade.php │ │ ├── 2_43.blade.php │ │ ├── 2_44.blade.php │ │ ├── 2_45.blade.php │ │ ├── 2_46.blade.php │ │ ├── 2_47.blade.php │ │ ├── 2_48.blade.php │ │ ├── 2_49.blade.php │ │ ├── 2_5.blade.php │ │ ├── 2_50.blade.php │ │ ├── 2_51.blade.php │ │ ├── 2_52.blade.php │ │ ├── 2_53.blade.php │ │ ├── 2_54.blade.php │ │ ├── 2_55.blade.php │ │ ├── 2_56.blade.php │ │ ├── 2_57.blade.php │ │ ├── 2_58.blade.php │ │ ├── 2_59.blade.php │ │ ├── 2_6.blade.php │ │ ├── 2_60.blade.php │ │ ├── 2_61.blade.php │ │ ├── 2_62.blade.php │ │ ├── 2_63.blade.php │ │ ├── 2_64.blade.php │ │ ├── 2_65.blade.php │ │ ├── 2_66.blade.php │ │ ├── 2_67.blade.php │ │ ├── 2_68.blade.php │ │ ├── 2_69.blade.php │ │ ├── 2_7.blade.php │ │ ├── 2_70.blade.php │ │ ├── 2_71.blade.php │ │ ├── 2_72.blade.php │ │ ├── 2_73.blade.php │ │ ├── 2_74.blade.php │ │ ├── 2_75.blade.php │ │ ├── 2_76.blade.php │ │ ├── 2_77.blade.php │ │ ├── 2_78.blade.php │ │ ├── 2_79.blade.php │ │ ├── 2_8.blade.php │ │ ├── 2_80.blade.php │ │ ├── 2_81.blade.php │ │ ├── 2_82.blade.php │ │ ├── 2_83.blade.php │ │ ├── 2_84.blade.php │ │ ├── 2_85.blade.php │ │ ├── 2_86.blade.php │ │ ├── 2_87.blade.php │ │ ├── 2_88.blade.php │ │ ├── 2_89.blade.php │ │ ├── 2_9.blade.php │ │ ├── 2_90.blade.php │ │ ├── 2_91.blade.php │ │ ├── 2_92.blade.php │ │ ├── 2_93.blade.php │ │ ├── 2_94.blade.php │ │ ├── 2_95.blade.php │ │ ├── 2_96.blade.php │ │ ├── 2_97.blade.php │ │ ├── 3_1.blade.php │ │ ├── 3_10.blade.php │ │ ├── 3_11.blade.php │ │ ├── 3_12.blade.php │ │ ├── 3_13.blade.php │ │ ├── 3_14.blade.php │ │ ├── 3_15.blade.php │ │ ├── 3_16.blade.php │ │ ├── 3_17.blade.php │ │ ├── 3_18.blade.php │ │ ├── 3_19.blade.php │ │ ├── 3_2.blade.php │ │ ├── 3_20.blade.php │ │ ├── 3_21.blade.php │ │ ├── 3_22.blade.php │ │ ├── 3_23.blade.php │ │ ├── 3_24.blade.php │ │ ├── 3_25.blade.php │ │ ├── 3_26.blade.php │ │ ├── 3_27.blade.php │ │ ├── 3_28.blade.php │ │ ├── 3_29.blade.php │ │ ├── 3_3.blade.php │ │ ├── 3_30.blade.php │ │ ├── 3_31.blade.php │ │ ├── 3_32.blade.php │ │ ├── 3_33.blade.php │ │ ├── 3_34.blade.php │ │ ├── 3_35.blade.php │ │ ├── 3_36.blade.php │ │ ├── 3_37.blade.php │ │ ├── 3_38.blade.php │ │ ├── 3_39.blade.php │ │ ├── 3_4.blade.php │ │ ├── 3_40.blade.php │ │ ├── 3_41.blade.php │ │ ├── 3_42.blade.php │ │ ├── 3_43.blade.php │ │ ├── 3_44.blade.php │ │ ├── 3_45.blade.php │ │ ├── 3_46.blade.php │ │ ├── 3_47.blade.php │ │ ├── 3_48.blade.php │ │ ├── 3_49.blade.php │ │ ├── 3_5.blade.php │ │ ├── 3_50.blade.php │ │ ├── 3_51.blade.php │ │ ├── 3_52.blade.php │ │ ├── 3_53.blade.php │ │ ├── 3_54.blade.php │ │ ├── 3_55.blade.php │ │ ├── 3_56.blade.php │ │ ├── 3_57.blade.php │ │ ├── 3_58.blade.php │ │ ├── 3_59.blade.php │ │ ├── 3_6.blade.php │ │ ├── 3_60.blade.php │ │ ├── 3_61.blade.php │ │ ├── 3_62.blade.php │ │ ├── 3_63.blade.php │ │ ├── 3_64.blade.php │ │ ├── 3_65.blade.php │ │ ├── 3_66.blade.php │ │ ├── 3_67.blade.php │ │ ├── 3_68.blade.php │ │ ├── 3_69.blade.php │ │ ├── 3_7.blade.php │ │ ├── 3_70.blade.php │ │ ├── 3_71.blade.php │ │ ├── 3_72.blade.php │ │ ├── 3_73.blade.php │ │ ├── 3_74.blade.php │ │ ├── 3_75.blade.php │ │ ├── 3_76.blade.php │ │ ├── 3_77.blade.php │ │ ├── 3_78.blade.php │ │ ├── 3_79.blade.php │ │ ├── 3_8.blade.php │ │ ├── 3_80.blade.php │ │ ├── 3_81.blade.php │ │ ├── 3_82.blade.php │ │ ├── 3_9.blade.php │ │ ├── 4_1.blade.php │ │ ├── 4_10.blade.php │ │ ├── 4_11.blade.php │ │ ├── 4_12.blade.php │ │ ├── 4_13.blade.php │ │ ├── 4_14.blade.php │ │ ├── 4_15.blade.php │ │ ├── 4_16.blade.php │ │ ├── 4_17.blade.php │ │ ├── 4_18.blade.php │ │ ├── 4_19.blade.php │ │ ├── 4_2.blade.php │ │ ├── 4_20.blade.php │ │ ├── 4_21.blade.php │ │ ├── 4_22.blade.php │ │ ├── 4_23.blade.php │ │ ├── 4_24.blade.php │ │ ├── 4_25.blade.php │ │ ├── 4_26.blade.php │ │ ├── 4_27.blade.php │ │ ├── 4_28.blade.php │ │ ├── 4_29.blade.php │ │ ├── 4_3.blade.php │ │ ├── 4_30.blade.php │ │ ├── 4_31.blade.php │ │ ├── 4_32.blade.php │ │ ├── 4_33.blade.php │ │ ├── 4_34.blade.php │ │ ├── 4_35.blade.php │ │ ├── 4_36.blade.php │ │ ├── 4_37.blade.php │ │ ├── 4_38.blade.php │ │ ├── 4_39.blade.php │ │ ├── 4_4.blade.php │ │ ├── 4_40.blade.php │ │ ├── 4_41.blade.php │ │ ├── 4_42.blade.php │ │ ├── 4_43.blade.php │ │ ├── 4_44.blade.php │ │ ├── 4_45.blade.php │ │ ├── 4_46.blade.php │ │ ├── 4_47.blade.php │ │ ├── 4_48.blade.php │ │ ├── 4_49.blade.php │ │ ├── 4_5.blade.php │ │ ├── 4_50.blade.php │ │ ├── 4_51.blade.php │ │ ├── 4_52.blade.php │ │ ├── 4_53.blade.php │ │ ├── 4_54.blade.php │ │ ├── 4_55.blade.php │ │ ├── 4_56.blade.php │ │ ├── 4_57.blade.php │ │ ├── 4_58.blade.php │ │ ├── 4_59.blade.php │ │ ├── 4_6.blade.php │ │ ├── 4_60.blade.php │ │ ├── 4_61.blade.php │ │ ├── 4_62.blade.php │ │ ├── 4_63.blade.php │ │ ├── 4_64.blade.php │ │ ├── 4_65.blade.php │ │ ├── 4_66.blade.php │ │ ├── 4_67.blade.php │ │ ├── 4_68.blade.php │ │ ├── 4_69.blade.php │ │ ├── 4_7.blade.php │ │ ├── 4_70.blade.php │ │ ├── 4_71.blade.php │ │ ├── 4_72.blade.php │ │ ├── 4_73.blade.php │ │ ├── 4_74.blade.php │ │ ├── 4_75.blade.php │ │ ├── 4_76.blade.php │ │ ├── 4_77.blade.php │ │ ├── 4_78.blade.php │ │ ├── 4_79.blade.php │ │ ├── 4_8.blade.php │ │ ├── 4_9.blade.php │ │ ├── 5_1.blade.php │ │ ├── 5_10.blade.php │ │ ├── 5_11.blade.php │ │ ├── 5_12.blade.php │ │ ├── 5_13.blade.php │ │ ├── 5_14.blade.php │ │ ├── 5_15.blade.php │ │ ├── 5_16.blade.php │ │ ├── 5_17.blade.php │ │ ├── 5_18.blade.php │ │ ├── 5_19.blade.php │ │ ├── 5_2.blade.php │ │ ├── 5_20.blade.php │ │ ├── 5_21.blade.php │ │ ├── 5_22.blade.php │ │ ├── 5_23.blade.php │ │ ├── 5_24.blade.php │ │ ├── 5_25.blade.php │ │ ├── 5_26.blade.php │ │ ├── 5_27.blade.php │ │ ├── 5_28.blade.php │ │ ├── 5_29.blade.php │ │ ├── 5_3.blade.php │ │ ├── 5_30.blade.php │ │ ├── 5_31.blade.php │ │ ├── 5_32.blade.php │ │ ├── 5_33.blade.php │ │ ├── 5_34.blade.php │ │ ├── 5_35.blade.php │ │ ├── 5_36.blade.php │ │ ├── 5_37.blade.php │ │ ├── 5_38.blade.php │ │ ├── 5_39.blade.php │ │ ├── 5_4.blade.php │ │ ├── 5_40.blade.php │ │ ├── 5_41.blade.php │ │ ├── 5_42.blade.php │ │ ├── 5_43.blade.php │ │ ├── 5_44.blade.php │ │ ├── 5_45.blade.php │ │ ├── 5_46.blade.php │ │ ├── 5_47.blade.php │ │ ├── 5_48.blade.php │ │ ├── 5_49.blade.php │ │ ├── 5_5.blade.php │ │ ├── 5_50.blade.php │ │ ├── 5_51.blade.php │ │ ├── 5_52.blade.php │ │ ├── 5_6.blade.php │ │ ├── 5_7.blade.php │ │ ├── 5_8.blade.php │ │ └── 5_9.blade.php │ ├── navigation.blade.php │ ├── show.blade.php │ ├── solution_sandbox_wrapper.blade.php │ └── solution_stub │ │ ├── 1_11.blade.php │ │ ├── 1_11_solution.blade.php │ │ ├── 1_12.blade.php │ │ ├── 1_12_solution.blade.php │ │ ├── 1_16.blade.php │ │ ├── 1_16_solution.blade.php │ │ ├── 1_17.blade.php │ │ ├── 1_17_solution.blade.php │ │ ├── 1_18.blade.php │ │ ├── 1_18_solution.blade.php │ │ ├── 1_19.blade.php │ │ ├── 1_19_solution.blade.php │ │ ├── 1_22.blade.php │ │ ├── 1_22_solution.blade.php │ │ ├── 1_23.blade.php │ │ ├── 1_23_solution.blade.php │ │ ├── 1_27.blade.php │ │ ├── 1_27_solution.blade.php │ │ ├── 1_28.blade.php │ │ ├── 1_28_solution.blade.php │ │ ├── 1_29.blade.php │ │ ├── 1_29_solution.blade.php │ │ ├── 1_3.blade.php │ │ ├── 1_30.blade.php │ │ ├── 1_30_solution.blade.php │ │ ├── 1_31.blade.php │ │ ├── 1_31_solution.blade.php │ │ ├── 1_32.blade.php │ │ ├── 1_32_solution.blade.php │ │ ├── 1_33.blade.php │ │ ├── 1_33_solution.blade.php │ │ ├── 1_35.blade.php │ │ ├── 1_35_solution.blade.php │ │ ├── 1_36.blade.php │ │ ├── 1_36_solution.blade.php │ │ ├── 1_37.blade.php │ │ ├── 1_37_solution.blade.php │ │ ├── 1_38.blade.php │ │ ├── 1_38_solution.blade.php │ │ ├── 1_39.blade.php │ │ ├── 1_39_solution.blade.php │ │ ├── 1_3_solution.blade.php │ │ ├── 1_40.blade.php │ │ ├── 1_40_solution.blade.php │ │ ├── 1_41.blade.php │ │ ├── 1_41_solution.blade.php │ │ ├── 1_42.blade.php │ │ ├── 1_42_solution.blade.php │ │ ├── 1_43.blade.php │ │ ├── 1_43_solution.blade.php │ │ ├── 1_44.blade.php │ │ ├── 1_44_solution.blade.php │ │ ├── 1_45.blade.php │ │ ├── 1_45_solution.blade.php │ │ ├── 1_46.blade.php │ │ ├── 1_46_solution.blade.php │ │ ├── 1_7.blade.php │ │ ├── 1_7_solution.blade.php │ │ ├── 1_8.blade.php │ │ ├── 1_8_solution.blade.php │ │ ├── 2_1.blade.php │ │ ├── 2_10.blade.php │ │ ├── 2_10_solution.blade.php │ │ ├── 2_11.blade.php │ │ ├── 2_11_solution.blade.php │ │ ├── 2_12.blade.php │ │ ├── 2_12_solution.blade.php │ │ ├── 2_17.blade.php │ │ ├── 2_17_solution.blade.php │ │ ├── 2_18.blade.php │ │ ├── 2_18_solution.blade.php │ │ ├── 2_19.blade.php │ │ ├── 2_19_solution.blade.php │ │ ├── 2_1_solution.blade.php │ │ ├── 2_2.blade.php │ │ ├── 2_20.blade.php │ │ ├── 2_20_solution.blade.php │ │ ├── 2_21.blade.php │ │ ├── 2_21_solution.blade.php │ │ ├── 2_23.blade.php │ │ ├── 2_23_solution.blade.php │ │ ├── 2_27.blade.php │ │ ├── 2_27_solution.blade.php │ │ ├── 2_28.blade.php │ │ ├── 2_28_solution.blade.php │ │ ├── 2_29.blade.php │ │ ├── 2_29_solution.blade.php │ │ ├── 2_2_solution.blade.php │ │ ├── 2_3.blade.php │ │ ├── 2_30.blade.php │ │ ├── 2_30_solution.blade.php │ │ ├── 2_31.blade.php │ │ ├── 2_31_solution.blade.php │ │ ├── 2_32.blade.php │ │ ├── 2_32_solution.blade.php │ │ ├── 2_33.blade.php │ │ ├── 2_33_solution.blade.php │ │ ├── 2_34.blade.php │ │ ├── 2_34_solution.blade.php │ │ ├── 2_35.blade.php │ │ ├── 2_35_solution.blade.php │ │ ├── 2_36.blade.php │ │ ├── 2_36_solution.blade.php │ │ ├── 2_37.blade.php │ │ ├── 2_37_solution.blade.php │ │ ├── 2_38.blade.php │ │ ├── 2_38_solution.blade.php │ │ ├── 2_39.blade.php │ │ ├── 2_39_solution.blade.php │ │ ├── 2_3_solution.blade.php │ │ ├── 2_4.blade.php │ │ ├── 2_40.blade.php │ │ ├── 2_40_solution.blade.php │ │ ├── 2_41.blade.php │ │ ├── 2_41_solution.blade.php │ │ ├── 2_42.blade.php │ │ ├── 2_42_solution.blade.php │ │ ├── 2_46.blade.php │ │ ├── 2_46_solution.blade.php │ │ ├── 2_47.blade.php │ │ ├── 2_47_solution.blade.php │ │ ├── 2_48.blade.php │ │ ├── 2_48_solution.blade.php │ │ ├── 2_4_solution.blade.php │ │ ├── 2_5.blade.php │ │ ├── 2_54.blade.php │ │ ├── 2_54_solution.blade.php │ │ ├── 2_56.blade.php │ │ ├── 2_56_solution.blade.php │ │ ├── 2_57.blade.php │ │ ├── 2_57_solution.blade.php │ │ ├── 2_58.blade.php │ │ ├── 2_58_solution.blade.php │ │ ├── 2_59.blade.php │ │ ├── 2_59_solution.blade.php │ │ ├── 2_5_solution.blade.php │ │ ├── 2_6.blade.php │ │ ├── 2_60.blade.php │ │ ├── 2_60_solution.blade.php │ │ ├── 2_61.blade.php │ │ ├── 2_61_solution.blade.php │ │ ├── 2_62.blade.php │ │ ├── 2_62_solution.blade.php │ │ ├── 2_65.blade.php │ │ ├── 2_65_solution.blade.php │ │ ├── 2_66.blade.php │ │ ├── 2_66_solution.blade.php │ │ ├── 2_68.blade.php │ │ ├── 2_68_solution.blade.php │ │ ├── 2_69.blade.php │ │ ├── 2_69_solution.blade.php │ │ ├── 2_6_solution.blade.php │ │ ├── 2_7.blade.php │ │ ├── 2_73.blade.php │ │ ├── 2_73_solution.blade.php │ │ ├── 2_74.blade.php │ │ ├── 2_74_solution.blade.php │ │ ├── 2_75.blade.php │ │ ├── 2_75_solution.blade.php │ │ ├── 2_78.blade.php │ │ ├── 2_78_solution.blade.php │ │ ├── 2_79.blade.php │ │ ├── 2_79_solution.blade.php │ │ ├── 2_7_solution.blade.php │ │ ├── 2_8.blade.php │ │ ├── 2_80.blade.php │ │ ├── 2_80_solution.blade.php │ │ ├── 2_83.blade.php │ │ ├── 2_83_solution.blade.php │ │ ├── 2_8_solution.blade.php │ │ ├── 2_9.blade.php │ │ ├── 2_9_solution.blade.php │ │ ├── 3_1.blade.php │ │ ├── 3_17.blade.php │ │ ├── 3_17_solution.blade.php │ │ ├── 3_18.blade.php │ │ ├── 3_18_solution.blade.php │ │ ├── 3_1_solution.blade.php │ │ ├── 3_2.blade.php │ │ ├── 3_21.blade.php │ │ ├── 3_21_solution.blade.php │ │ ├── 3_22.blade.php │ │ ├── 3_22_solution.blade.php │ │ ├── 3_23.blade.php │ │ ├── 3_23_solution.blade.php │ │ ├── 3_24.blade.php │ │ ├── 3_24_solution.blade.php │ │ ├── 3_25.blade.php │ │ ├── 3_25_solution.blade.php │ │ ├── 3_28.blade.php │ │ ├── 3_28_solution.blade.php │ │ ├── 3_29.blade.php │ │ ├── 3_29_solution.blade.php │ │ ├── 3_2_solution.blade.php │ │ ├── 3_3.blade.php │ │ ├── 3_30.blade.php │ │ ├── 3_30_solution.blade.php │ │ ├── 3_33.blade.php │ │ ├── 3_33_solution.blade.php │ │ ├── 3_35.blade.php │ │ ├── 3_35_solution.blade.php │ │ ├── 3_37.blade.php │ │ ├── 3_37_solution.blade.php │ │ ├── 3_3_solution.blade.php │ │ ├── 3_4.blade.php │ │ ├── 3_47.blade.php │ │ ├── 3_47_solution.blade.php │ │ ├── 3_48.blade.php │ │ ├── 3_48_solution.blade.php │ │ ├── 3_4_solution.blade.php │ │ ├── 3_5.blade.php │ │ ├── 3_50.blade.php │ │ ├── 3_50_solution.blade.php │ │ ├── 3_54.blade.php │ │ ├── 3_54_solution.blade.php │ │ ├── 3_55.blade.php │ │ ├── 3_55_solution.blade.php │ │ ├── 3_56.blade.php │ │ ├── 3_56_solution.blade.php │ │ ├── 3_59.blade.php │ │ ├── 3_59_solution.blade.php │ │ ├── 3_5_solution.blade.php │ │ ├── 3_6.blade.php │ │ ├── 3_60.blade.php │ │ ├── 3_60_solution.blade.php │ │ ├── 3_61.blade.php │ │ ├── 3_61_solution.blade.php │ │ ├── 3_62.blade.php │ │ ├── 3_62_solution.blade.php │ │ ├── 3_64.blade.php │ │ ├── 3_64_solution.blade.php │ │ ├── 3_65.blade.php │ │ ├── 3_65_solution.blade.php │ │ ├── 3_69.blade.php │ │ ├── 3_69_solution.blade.php │ │ ├── 3_6_solution.blade.php │ │ ├── 3_7.blade.php │ │ ├── 3_70.blade.php │ │ ├── 3_70_solution.blade.php │ │ ├── 3_71.blade.php │ │ ├── 3_71_solution.blade.php │ │ ├── 3_73.blade.php │ │ ├── 3_73_solution.blade.php │ │ ├── 3_74.blade.php │ │ ├── 3_74_solution.blade.php │ │ ├── 3_76.blade.php │ │ ├── 3_76_solution.blade.php │ │ ├── 3_7_solution.blade.php │ │ ├── 3_8.blade.php │ │ ├── 3_81.blade.php │ │ ├── 3_81_solution.blade.php │ │ ├── 3_82.blade.php │ │ ├── 3_82_solution.blade.php │ │ ├── 3_8_solution.blade.php │ │ ├── 4_1.blade.php │ │ ├── 4_1_solution.blade.php │ │ ├── 4_4.blade.php │ │ ├── 4_4_solution.blade.php │ │ ├── 4_5.blade.php │ │ ├── 4_5_solution.blade.php │ │ ├── 4_6.blade.php │ │ ├── 4_6_solution.blade.php │ │ ├── 4_7.blade.php │ │ ├── 4_7_solution.blade.php │ │ ├── 4_8.blade.php │ │ └── 4_8_solution.blade.php │ ├── home │ ├── index.blade.php │ └── landing.blade.php │ ├── layouts │ ├── _footer.blade.php │ ├── _nav.blade.php │ ├── app.blade.php │ └── deps │ │ ├── _gtm_body.blade.php │ │ ├── _gtm_head.blade.php │ │ └── _metrika.blade.php │ ├── log │ └── index.blade.php │ ├── my │ ├── index.blade.php │ └── progresses │ │ ├── _my_chapters.blade.php │ │ └── _my_solutions.blade.php │ ├── pages │ └── about │ │ ├── en.blade.php │ │ └── ru.blade.php │ ├── partials │ └── chapter_partial.blade.php │ ├── rating │ ├── _menu.blade.php │ ├── comments.blade.php │ └── top.blade.php │ ├── settings │ ├── _menu.blade.php │ ├── account │ │ └── index.blade.php │ └── profile │ │ └── index.blade.php │ ├── solution │ ├── index.blade.php │ └── show.blade.php │ ├── user │ ├── comment │ │ └── index.blade.php │ └── show.blade.php │ └── vendor │ └── flash │ ├── message.blade.php │ └── modal.blade.php ├── routes ├── api.php ├── breadcrumbs.php ├── channels.php ├── console.php └── web.php ├── server.php ├── sniffs └── Standarts │ └── HexletSicp │ └── Sniffs │ └── Classes │ └── DebugFunctionsSearchSniff.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── ControllerTestCase.php ├── CreatesApplication.php ├── Exercises │ └── TeacherSolutionsTest.php ├── Feature │ └── Http │ │ └── Controllers │ │ ├── ActivityControllerTest.php │ │ ├── Api │ │ ├── Exercise │ │ │ ├── CheckControllerTest.php │ │ │ └── SolutionControllerTest.php │ │ └── ExerciseControllerTest.php │ │ ├── Auth │ │ └── Social │ │ │ └── GithubControllerTest.php │ │ ├── Chapter │ │ └── ChapterMemberControllerTest.php │ │ ├── ChapterControllerTest.php │ │ ├── CommentControllerTest.php │ │ ├── ExerciseControllerTest.php │ │ ├── HomeControllerTest.php │ │ ├── MyControllerTest.php │ │ ├── PagesControllerTest.php │ │ ├── Rating │ │ ├── CommentControllerTest.php │ │ └── TopControllerTest.php │ │ ├── Settings │ │ ├── AccountControllerTest.php │ │ └── ProfileControllerTest.php │ │ ├── SitemapControllerTest.php │ │ ├── SolutionControllerTest.php │ │ ├── User │ │ └── SolutionControllerTest.php │ │ ├── UserCommentControllerTest.php │ │ └── UserControllerTest.php ├── TestCase.php ├── Unit │ └── .gitkeep └── fixtures │ └── sitemap.xml ├── vite.config.js └── xdebug.ini /.dockerignore: -------------------------------------------------------------------------------- 1 | vendor 2 | node_modules 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - 'main' 7 | push: 8 | branches-ignore: 9 | - 'main' 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - name: Run CI 18 | run: | 19 | make ci 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/build 4 | /public/storage 5 | /storage/*.key 6 | /vendor 7 | .env 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | .idea 14 | .vscode 15 | /build 16 | _ide_helper.php 17 | _ide_helper_models.php 18 | .phpstorm.meta.php 19 | /mix-manifest.json 20 | css 21 | js 22 | public/img/* 23 | composer.phar 24 | .phpunit.cache 25 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | update-notifier=false 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | resources/views/exercise/listing/* 2 | resources/views/exercise/solution_stub/* 3 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | plugins: 3 | - "@shufo/prettier-plugin-blade" 4 | overrides: 5 | - files: 6 | - "*.blade.php" 7 | options: 8 | parser: blade 9 | tabWidth: 2 10 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-nginx -C nginx.conf public/ 2 | release: php artisan migrate --force 3 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: PORT=8000 make start-app 2 | frontend: make start-frontend 3 | -------------------------------------------------------------------------------- /app/Github/GithubInterface.php: -------------------------------------------------------------------------------- 1 | text($text); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | is($user); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Presenters/UserPresenter.php: -------------------------------------------------------------------------------- 1 | email; 15 | $encryptEmail = md5($email); 16 | 17 | return "https://www.gravatar.com/avatar/{$encryptEmail}?s=500"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /config/google.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'key' => env('GOOGLE_TAG_MANAGER_KEY'), 6 | ], 7 | ]; 8 | -------------------------------------------------------------------------------- /config/yandex.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'id' => env('YANDEX_METRIKA_ID'), 6 | ], 7 | ]; 8 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/seeders/SolutionsTableSeeder.php: -------------------------------------------------------------------------------- 1 | count(30)->create(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeders/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | count(10)->create(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /design/logo-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/design/logo-02.png -------------------------------------------------------------------------------- /docs/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/.keep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: */register 3 | Disallow: */login 4 | Disallow: */oauth/ 5 | Disallow: */users/ 6 | Disallow: /en/ 7 | Disallow: *? 8 | -------------------------------------------------------------------------------- /public/yandex_7b3f1e2c1757ecf0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Verification: 7b3f1e2c1757ecf0 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/images/Patchouli_Gives_SICP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/Patchouli_Gives_SICP.png -------------------------------------------------------------------------------- /resources/assets/images/advice_dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/advice_dog.jpg -------------------------------------------------------------------------------- /resources/assets/images/exercises/1_29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/1_29.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_24.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_34_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_34_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_34_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_34_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_37.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_42.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_52_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_52_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_52_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_52_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_56.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_63.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_77.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_83.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/2_91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/2_91.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_30.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_38.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_43.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_59_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_59_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_59_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_59_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_61.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_65.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_73_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_73_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_73_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_73_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_78_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_78_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_78_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_78_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_80_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_80_1.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_80_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_80_2.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_80_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_80_3.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_80_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_80_4.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/3_80_5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/3_80_5.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/4_76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/4_76.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/5_12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/5_12.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/5_14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/5_14.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/5_20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/5_20.gif -------------------------------------------------------------------------------- /resources/assets/images/exercises/5_27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/exercises/5_27.gif -------------------------------------------------------------------------------- /resources/assets/images/hexlet_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/hexlet_logo.png -------------------------------------------------------------------------------- /resources/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/logo.png -------------------------------------------------------------------------------- /resources/assets/images/sicp_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/sicp_cover.jpg -------------------------------------------------------------------------------- /resources/assets/images/waiting_clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/resources/assets/images/waiting_clock.png -------------------------------------------------------------------------------- /resources/js/common/checkStatusMap.js: -------------------------------------------------------------------------------- 1 | export default { 2 | idle: 'idle', 3 | success: 'success', 4 | failure: 'failure', 5 | check_error: 'failure', 6 | tests_failed: 'failure', 7 | } 8 | -------------------------------------------------------------------------------- /resources/js/common/codeTemplates.js: -------------------------------------------------------------------------------- 1 | export default { 2 | withoutTemplate: text => `#| ${text} |#\n`, 3 | withTemplate: (text, code) => `#| BEGIN (${text}) |#\n${code}\n#| END |#`, 4 | } 5 | -------------------------------------------------------------------------------- /resources/js/common/currentTheme.js: -------------------------------------------------------------------------------- 1 | export default document.querySelector('html').dataset.bsTheme 2 | -------------------------------------------------------------------------------- /resources/js/common/hashLocationMap.js: -------------------------------------------------------------------------------- 1 | export default { 2 | '#editor': 'editor', 3 | '#output': 'output', 4 | '#tests': 'tests', 5 | } 6 | -------------------------------------------------------------------------------- /resources/js/common/routes.js: -------------------------------------------------------------------------------- 1 | const host = '' 2 | const prefix = 'api' 3 | 4 | export default { 5 | runCheckPath: exerciseId => [host, prefix, 'exercises', exerciseId, 'check'].join('/'), 6 | exerciseInfoPath: exerciseId => [host, prefix, 'exercises', exerciseId].join('/'), 7 | saveSolutionPath: exerciseId => [host, prefix, 'exercises', exerciseId, 'solutions'].join('/'), 8 | } 9 | -------------------------------------------------------------------------------- /resources/js/common/tabNameKeysMap.js: -------------------------------------------------------------------------------- 1 | export default { 2 | editorKey: 'editor', 3 | outputKey: 'output', 4 | testForExerciseKey: 'testForExercise', 5 | teacherSolutionKey: 'teacherSolution', 6 | } 7 | -------------------------------------------------------------------------------- /resources/js/common/tabNamesMap.js: -------------------------------------------------------------------------------- 1 | export default { 2 | editor: 'editor', 3 | output: 'output', 4 | tests: 'tests', 5 | teacherSolution: 'teacherSolution', 6 | } 7 | -------------------------------------------------------------------------------- /resources/js/components/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Card } from 'react-bootstrap' 3 | import TabsBox from './TabsBox.jsx' 4 | import ControlBox from './ControlBox.jsx' 5 | 6 | const App = () => ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | ) 14 | 15 | export default App 16 | -------------------------------------------------------------------------------- /resources/js/context/ExerciseIdContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react' 2 | 3 | const ExerciseIdContext = createContext(null) 4 | 5 | export const ExerciseIdProvider = ExerciseIdContext.Provider 6 | export default ExerciseIdContext 7 | -------------------------------------------------------------------------------- /resources/js/context/UserIdContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react' 2 | 3 | const UserIdContext = createContext(null) 4 | 5 | export const UserIdProvider = UserIdContext.Provider 6 | export default UserIdContext 7 | -------------------------------------------------------------------------------- /resources/js/editor.js: -------------------------------------------------------------------------------- 1 | import './components/index' 2 | -------------------------------------------------------------------------------- /resources/js/hljs.js: -------------------------------------------------------------------------------- 1 | import hljs from 'highlight.js/lib/core' 2 | import scheme from 'highlight.js/lib/languages/scheme' 3 | import vbnet from 'highlight.js/lib/languages/vbnet' 4 | import sql from 'highlight.js/lib/languages/sql' 5 | import 'highlight.js/styles/github.css' 6 | 7 | hljs.registerLanguage('scheme', scheme) 8 | hljs.registerLanguage('vbnet', vbnet) 9 | hljs.registerLanguage('sql', sql) 10 | 11 | hljs.highlightAll() 12 | -------------------------------------------------------------------------------- /resources/js/locales/index.js: -------------------------------------------------------------------------------- 1 | import en from './en.js' 2 | import ru from './ru.js' 3 | 4 | export default { en, ru } 5 | -------------------------------------------------------------------------------- /resources/lang/en/breadcrumb.php: -------------------------------------------------------------------------------- 1 | 'Contents', 5 | 'exercise' => 'Exercise', 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/console.php: -------------------------------------------------------------------------------- 1 | 'Generating sitemap', 5 | ]; 6 | -------------------------------------------------------------------------------- /resources/lang/en/errors.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'title' => '404 – Grats! You broke it', 6 | 'subtitle' => "This page doesn't exist or some other horrible error has occured", 7 | 'button' => 'Take Me Home ', 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_1.php: -------------------------------------------------------------------------------- 1 | 'Sequence of expressions', 5 | 'description' => 6 | 'Below is a sequence of expressions. ' . 7 | 'What is the result printed by the interpreter in response to each expression? ' . 8 | 'Assume that the sequence is to be evaluated in the order in which it is presented.', 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_2.php: -------------------------------------------------------------------------------- 1 | 'Into prefix form', 5 | 'description' => 'Translate the following expression into prefix form:', 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_21.php: -------------------------------------------------------------------------------- 1 | 'Smallest divisor', 5 | 'description' => [ 6 | '1' => 7 | 'Use the ', 8 | '2' => 9 | ' procedure to find the smallest divisor of each of the following numbers: 199, 1999, 19999.', 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_3.php: -------------------------------------------------------------------------------- 1 | 'Sum of the squares', 5 | 'description' => [ 6 | '1' => 7 | 'Define a procedure ', 8 | '2' => 9 | ' that takes three numbers as arguments and returns the sum of the squares of the two larger numbers.', 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_30.php: -------------------------------------------------------------------------------- 1 | 'Iteration', 5 | 'description' => [ 6 | '1' => 7 | "The ", 8 | '2' => 9 | " procedure above generates a linear recursion. The procedure can be rewritten so that the sum is performed iteratively. " . 10 | "Show how to do this by filling in the missing expressions in the following definition:", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_34.php: -------------------------------------------------------------------------------- 1 | 'Evaluate the combination', 5 | 'description' => [ 6 | '1' => 7 | "Suppose we define the procedure", 8 | '2' => 9 | "Then we have", 10 | '3' => 11 | "What happens if we (perversely) ask the interpreter to evaluate the combination ", 12 | '4' => 13 | "? Explain.", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_4.php: -------------------------------------------------------------------------------- 1 | 'Composite expressions', 5 | 'description' => 6 | 'Observe that our model of evaluation allows for combinations whose operators are compound expressions. ' . 7 | 'Use this observation to describe the behavior of the following procedure:', 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/1_40.php: -------------------------------------------------------------------------------- 1 | 'Approximate zeros', 5 | 'description' => [ 6 | '1' => 7 | "Define a procedure ", 8 | '2' => 9 | " that can be used together with the ", 10 | '3' => 11 | " procedure in expressions of the form", 12 | '4' => 13 | "to approximate zeros of the cubic ", 14 | '5' => 15 | ".", 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_10.php: -------------------------------------------------------------------------------- 1 | 'Interval that spans zero', 5 | 'description' => 6 | "Ben Bitdiddle, an expert systems programmer, looks over Alyssa's shoulder and comments that it is not clear what it means to divide by an interval that spans zero. " . 7 | "Modify Alyssa's code to check for this condition and to signal an error if it occurs.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_17.php: -------------------------------------------------------------------------------- 1 | 'Last element of list', 5 | 'description' => [ 6 | '1' => 7 | "Define a procedure ", 8 | '2' => 9 | " that returns the list that contains only the last element of a given (nonempty) list:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_18.php: -------------------------------------------------------------------------------- 1 | 'Reverse', 5 | 'description' => [ 6 | '1' => 7 | "Define a procedure ", 8 | '2' => 9 | " that takes a list as argument and returns a list of the same elements in reverse order:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_25.php: -------------------------------------------------------------------------------- 1 | 'Pick 7 from lists', 5 | 'description' => [ 6 | '1' => 7 | "Give combinations of ", 8 | '2' => 9 | "s and ", 10 | '3' => 11 | "s that will pick ", 12 | '4' => 13 | " from each of the following lists:", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_26.php: -------------------------------------------------------------------------------- 1 | 'Expressions with two lists', 5 | 'description' => [ 6 | '1' => 7 | "Suppose we define ", 8 | '2' => 9 | " and ", 10 | '3' => 11 | " to be two lists:", 12 | '4' => 13 | "What result is printed by the interpreter in response to evaluating each of the following expressions:", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_28.php: -------------------------------------------------------------------------------- 1 | 'List of tree leaves', 5 | 'description' => [ 6 | '1' => 7 | "Write a procedure ", 8 | '2' => 9 | " that takes as argument a tree (represented as a list) and returns a list whose elements are all the leaves of the tree arranged in left-to-right order. For example,", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_31.php: -------------------------------------------------------------------------------- 1 | 'Tree map', 5 | 'description' => [ 6 | '1' => 7 | "Abstract your answer to exercise ", 8 | '2' => 9 | ", to produce a procedure ", 10 | '3' => 11 | " with the property that ", 12 | '4' => 13 | " could be defined as", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_33.php: -------------------------------------------------------------------------------- 1 | 'List-manipulation operations as accumulations', 5 | 'description' => 6 | "Fill in the missing expressions to complete the following definitions of some basic list-manipulation operations as accumulations:", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_35.php: -------------------------------------------------------------------------------- 1 | 'Count-leaves as an accumulation', 5 | 'description' => [ 6 | '1' => 7 | "Redefine ", 8 | '2' => 9 | " from section 2.2.2 as an accumulation:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_47.php: -------------------------------------------------------------------------------- 1 | "Frames implementation", 5 | 'description' => [ 6 | '1' => 7 | "Here are two possible constructors for frames:", 8 | '2' => 9 | "For each constructor supply the appropriate selectors to produce an implementation for frames.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_50.php: -------------------------------------------------------------------------------- 1 | 'Flip and rotate transformations', 5 | 'description' => [ 6 | '1' => 7 | "Define the transformation ", 8 | '2' => 9 | ", which flips painters horizontally, and transformations that rotate painters counterclockwise by ", 10 | '3' => 11 | " degrees and ", 12 | '4' => 13 | " degrees.", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_53.php: -------------------------------------------------------------------------------- 1 | 'Expressions evaluating', 5 | 'description' => 6 | "What would the interpreter print in response to evaluating each of the following expressions?", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_55.php: -------------------------------------------------------------------------------- 1 | "Expressions with quotes", 5 | 'description' => [ 6 | '1' => 7 | "Eva Lu Ator types to the interpreter the expression", 8 | '2' => 9 | "To her surprise, the interpreter prints back ", 10 | '3' => 11 | ". Explain.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_59.php: -------------------------------------------------------------------------------- 1 | 'Union-set for sets represented as unordered lists', 5 | 'description' => [ 6 | '1' => 7 | "Implement the ", 8 | '2' => 9 | " operation for the unordered-list representation of sets.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_62.php: -------------------------------------------------------------------------------- 1 | 'Union-set for for sets represented as ordered lists', 5 | 'description' => [ 6 | '1' => 7 | "Give a ", 8 | '2' => 9 | " implementation of ", 10 | '3' => 11 | " for sets represented as ordered lists.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_66.php: -------------------------------------------------------------------------------- 1 | 'Lookup procedure', 5 | 'description' => [ 6 | '1' => 7 | "Implement the ", 8 | '2' => 9 | " procedure for the case where the set of records is structured as a binary tree, ordered by the numerical values of the keys.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_67.php: -------------------------------------------------------------------------------- 1 | "Message decoding", 5 | 'description' => [ 6 | '1' => 7 | "Define an encoding tree and a sample message:", 8 | '2' => 9 | "Use the ", 10 | '3' => 11 | " procedure to decode the message, and give the result.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_75.php: -------------------------------------------------------------------------------- 1 | 'Make-from-mag-ang constructor in message-passing style', 5 | 'description' => [ 6 | '1' => 7 | "Implement the constructor ", 8 | '2' => 9 | " in message-passing style. This procedure should be analogous to the ", 10 | '3' => 11 | " procedure given above.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_8.php: -------------------------------------------------------------------------------- 1 | 'Subtraction of intervals', 5 | 'description' => [ 6 | '1' => 7 | "Using reasoning analogous to Alyssa's, describe how the difference of two intervals may be computed. " . 8 | "Define a corresponding subtraction procedure, called ", 9 | '2' => 10 | ".", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_80.php: -------------------------------------------------------------------------------- 1 | 'Generic predicate =zero?', 5 | 'description' => [ 6 | '1' => 7 | "Define a generic predicate ", 8 | '2' => 9 | " that tests if its argument is zero, and install it in the generic arithmetic package. " . 10 | "This operation should work for ordinary numbers, rational numbers, and complex numbers.", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_87.php: -------------------------------------------------------------------------------- 1 | '=zero? for polynomials', 5 | 'description' => [ 6 | '1' => 7 | "Install ", 8 | '2' => 9 | " for polynomials in the generic arithmetic package. This will allow ", 10 | '3' => 11 | " to work for polynomials with coefficients that are themselves polynomials.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_88.php: -------------------------------------------------------------------------------- 1 | 'Subtraction of polynomials', 5 | 'description' => 6 | "Extend the polynomial system to include subtraction of polynomials. " . 7 | "(Hint: You may find it helpful to define a generic negation operation.)", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_89.php: -------------------------------------------------------------------------------- 1 | 'Procedures for dense polynomials', 5 | 'description' => 6 | "Define procedures that implement the term-list representation described above as appropriate for dense polynomials.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/2_92.php: -------------------------------------------------------------------------------- 1 | 'Addition and multiplication of polynomials with different variables', 5 | 'description' => 6 | "By imposing an ordering on variables, extend the polynomial package so that addition and multiplication of polynomials works for polynomials in different variables. (This is not easy!)", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_15.php: -------------------------------------------------------------------------------- 1 | 'Box-and-pointer diagrams', 5 | 'description' => [ 6 | '1' => 7 | 'Draw box-and-pointer diagrams to explain the effect of ', 8 | '2' => 9 | ' on the structures ', 10 | '3' => 11 | ' and ', 12 | '4' => 13 | ' above.', 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_19.php: -------------------------------------------------------------------------------- 1 | 'Optimize memory usage', 5 | 'description' => [ 6 | '1' => 7 | 'Redo exercise ', 8 | '2' => 9 | ' using an algorithm that takes only a constant amount of space. ' . 10 | '(This requires a very clever idea.)', 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_20.php: -------------------------------------------------------------------------------- 1 | 'Draw environment diagrams', 5 | 'description' => [ 6 | '1' => 7 | 'Draw environment diagrams to illustrate the evaluation of the sequence of expressions', 8 | '2' => 9 | ' using the procedural implementation of pairs given above. ' . 10 | '(Compare exercise ', 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_28.php: -------------------------------------------------------------------------------- 1 | 'An or-gate as a primitive function box', 5 | 'description' => [ 6 | '1' => 7 | "Define an or-gate as a primitive function box. Your ", 8 | '2' => 9 | "constructor should be similar to ", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_35.php: -------------------------------------------------------------------------------- 1 | 'Squarer as a primitive constraint', 5 | 'description' => [ 6 | '1' => 7 | "Ben Bitdiddle tells Louis that one way to avoid the trouble in exercise", 8 | '2' => 9 | "is to define a squarer as a new primitive constraint. Fill in the missing portions in Ben's outline for a procedure to implement such a constraint:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_39.php: -------------------------------------------------------------------------------- 1 | 'Remaining possibilities', 5 | 'description' => 6 | "Which of the five possibilities in the parallel execution shown above remain if we instead serialize execution as follows:", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_40.php: -------------------------------------------------------------------------------- 1 | "All possible values of x", 5 | 'description' => [ 6 | '1' => 7 | "Give all possible values of ", 8 | '2' => 9 | " that can result from executing", 10 | '3' => 11 | "Which of these possibilities remain if we instead use serialized procedures:", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_53.php: -------------------------------------------------------------------------------- 1 | 'Description of the elements of the stream', 5 | 'description' => 6 | "Without running the program, describe the elements of the stream defined by", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_72.php: -------------------------------------------------------------------------------- 1 | 'A stream of numbers that can be written as the sum of two squares', 5 | 'description' => [ 6 | '1' => 7 | "In a similar way to exercise ", 8 | '2' => 9 | " generate a stream of all numbers that can be written as the sum of two squares in three different ways (showing how they can be so written).", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/3_79.php: -------------------------------------------------------------------------------- 1 | 'Generalize the solve-2nd procedure', 5 | 'description' => [ 6 | '1' => 7 | "Generalize the ", 8 | '2' => 9 | " procedure of exercise ", 10 | '3' => 11 | " so that it can be used to solve general second-order differential equations ", 12 | '4' => 13 | ".", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_11.php: -------------------------------------------------------------------------------- 1 | 2 | 'Rewrite the environment operations', 6 | 'description' => "Instead of representing a frame as a pair of lists, we can represent a frame as a list " . 7 | "of bindings, where each binding is a name-value pair. Rewrite the environment operations to use this " . 8 | "alternative representation.", 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_22.php: -------------------------------------------------------------------------------- 1 | 'Extend the evaluator', 5 | 'description' => [ 6 | '1' => 7 | "Extend the evaluator in this section to support the special form ", 8 | '2' => 9 | ". See exercise ", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_24.php: -------------------------------------------------------------------------------- 1 | 'Design and carry out some experiments', 5 | 'description' => "Design and carry out some experiments to compare the speed of the original metacircular " . 6 | "evaluator with the version in this section. Use your results to estimate the fraction of time that is " . 7 | "spent in analysis versus execution for various procedures.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_27.php: -------------------------------------------------------------------------------- 1 | 'The interaction between lazy evaluation and side effects', 5 | 'description' => [ 6 | '1' => "Suppose we type in the following definitions to the lazy evaluator:", 7 | '2' => "Give the missing values in the following sequence of interactions, and explain your answers.", 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_32.php: -------------------------------------------------------------------------------- 1 | 'The difference between the streams and the lazy lists', 5 | 'description' => 'Give some examples that illustrate the difference between the streams of chapter 3 and the ' . 6 | '"lazier" lazy lists described in this section. How can you take advantage of this extra laziness?', 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_34.php: -------------------------------------------------------------------------------- 1 | 'Modify the driver loop for the evaluator', 5 | 'description' => "Modify the driver loop for the evaluator so that lazy pairs and lists will print in some " . 6 | "reasonable way. (What are you going to do about infinite lists?) You may also need to modify the " . 7 | "representation of lazy pairs so that the evaluator can identify them in order to print them.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_37.php: -------------------------------------------------------------------------------- 1 | 'Efficiency of generating Pythagorean triples', 5 | 'description' => [ 6 | '1' => "Ben Bitdiddle claims that the following method for generating Pythagorean triples is more " . 7 | "efficient than the one in exercise ", 8 | '2' => ". Is he correct? (Hint: Consider the number of possibilities that must be explored.)", 9 | ], 10 | ]; 11 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_38.php: -------------------------------------------------------------------------------- 1 | 'Modify the multiple-dwelling procedure', 5 | 'description' => [ 6 | '1' => 7 | "Modify the ", 8 | '2' => 9 | " procedure to omit the requirement that Smith and Fletcher do " . 10 | "not live on adjacent floors. How many solutions are there to this modified puzzle?", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_41.php: -------------------------------------------------------------------------------- 1 | 'Solve the multiple dwelling puzzle', 5 | 'description' => "Write an ordinary Scheme program to solve the multiple dwelling puzzle.", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_44.php: -------------------------------------------------------------------------------- 1 | "A nondeterministic program to solve ''eight-queens puzzle''", 5 | 'description' => [ 6 | '1' => 7 | "Exercise ", 8 | '2' => 9 | " described the ''eight-queens puzzle'' of placing queens on a chessboard so that no two attack each other. Write a nondeterministic program to solve this puzzle.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_45.php: -------------------------------------------------------------------------------- 1 | "Five different ways of sentence parsing", 5 | 'description' => 6 | "With the grammar given above, the following sentence can be parsed in five different ways: ''The professor lectures to the student in the class with the cat.'' Give the five parses and explain the differences in shades of meaning among them.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_48.php: -------------------------------------------------------------------------------- 1 | "The grammar extension", 5 | 'description' => 6 | "Extend the grammar given above to handle more complex sentences. For example, you could extend noun phrases and verb phrases to include adjectives and adverbs, or you could handle compound sentences.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_50.php: -------------------------------------------------------------------------------- 1 | "Special form ramb", 5 | 'description' => [ 6 | '1' => 7 | "Implement a new special form ", 8 | '2' => 9 | " that is like ", 10 | '3' => 11 | " except that it searches alternatives in a random order, rather than from left to right. Show how this can help with Alyssa's problem in exercise ", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_53.php: -------------------------------------------------------------------------------- 1 | "The result of evaluating", 5 | 'description' => [ 6 | '1' => 7 | "With ", 8 | '2' => 9 | " as described in exercise ", 10 | '3' => 11 | " and ", 12 | '4' => 13 | " as in exercise ", 14 | '5' => 15 | ", what will be the result of evaluating", 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_58.php: -------------------------------------------------------------------------------- 1 | "''Big shot'' rule", 5 | 'description' => 6 | "Define a rule that says that a person is a ''big shot'' in a division if the person works in the division but does not have a supervisor who works in the division.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_61.php: -------------------------------------------------------------------------------- 1 | "Rules for next-to relation", 5 | 'description' => [ 6 | '1' => 7 | "The following rules implement a ", 8 | '2' => 9 | " relation that finds adjacent elements of a list:", 10 | '3' => 11 | "What will the response be to the following queries?", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/4_73.php: -------------------------------------------------------------------------------- 1 | "Explicit delay in flatten-stream", 5 | 'description' => [ 6 | '1' => 7 | "Why does ", 8 | '2' => 9 | " use ", 10 | '3' => 11 | " explicitly? What would be wrong with defining it as follows:", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_1.php: -------------------------------------------------------------------------------- 1 | "Register machine", 5 | 'description' => 6 | "Design a register machine to compute factorials using the iterative algorithm specified by the following procedure. Draw data-path and controller diagrams for this machine.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_10.php: -------------------------------------------------------------------------------- 1 | "New syntax for register-machine", 5 | 'description' => "Design a new syntax for register-machine instructions and modify the simulator to use " . 6 | "your new syntax. Can you implement your new syntax without changing any part of the simulator except the " . 7 | "syntax procedures in this section?", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_15.php: -------------------------------------------------------------------------------- 1 | "Instruction counting", 5 | 'description' => 6 | "Add instruction counting to the register machine simulation. That is, have the machine model keep track of the number of instructions executed. " . 7 | "Extend the machine model's interface to accept a new message that prints the value of the instruction count and resets the count to zero.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_2.php: -------------------------------------------------------------------------------- 1 | 'Describe the iterative factorial machine', 5 | 'description' => "Use the register-machine language to describe the iterative factorial machine of exercise ", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_25.php: -------------------------------------------------------------------------------- 1 | "Normal order evaluator based on lazy evaluator", 5 | 'description' => 6 | "Modify the evaluator so that it uses normal-order evaluation, based on the lazy evaluator of section 4.2.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_35.php: -------------------------------------------------------------------------------- 1 | "An example of compiler output", 5 | 'description' => [ 6 | '1' => 7 | "What expression was compiled to produce the code shown in figure 5.18?", 8 | '2' => 9 | "Figure 5.18: An example of compiler output", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_40.php: -------------------------------------------------------------------------------- 1 | "Compile-time environment maintaining", 5 | 'description' => [ 6 | '1' => 7 | "Modify the compiler to maintain the compile-time environment as described above. That is, add a compile-time-environment argument to ", 8 | '2' => 9 | " the various code generators, and extend it in ", 10 | '3' => 11 | ".", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_5.php: -------------------------------------------------------------------------------- 1 | "Hand-simulate the factorial and Fibonacci machines", 5 | 'description' => "Hand-simulate the factorial and Fibonacci machines, using some nontrivial input (requiring " . 6 | "execution of at least one recursive call). Show the contents of the stack at each significant point in " . 7 | "the execution.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_6.php: -------------------------------------------------------------------------------- 1 | "Extra save and extra restore", 5 | 'description' => [ 6 | '1' => 7 | "Ben Bitdiddle observes that the Fibonacci machine's controller sequence has an extra ", 8 | '2' => 9 | " and an extra ", 10 | '3' => 11 | ", which can be removed to make a faster machine. Where are these instructions?", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_7.php: -------------------------------------------------------------------------------- 1 | "Test the machines", 5 | 'description' => "Use the simulator to test the machines you designed in exercise ", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/en/exercises/5_9.php: -------------------------------------------------------------------------------- 1 | "Using operations to registers and constants only", 5 | 'description' => "The treatment of machine operations above permits them to operate on labels as well as " . 6 | "on constants and the contents of registers. Modify the expression-processing procedures to enforce the " . 7 | "condition that operations can be used only with registers and constants.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/en/login.php: -------------------------------------------------------------------------------- 1 | 'Login', 5 | 'remember_me' => 'Remember Me', 6 | 'password' => 'Password', 7 | 'submit' => 'Login', 8 | 'email' => 'E-mail', 9 | 'reset_password' => 'Forgot Your Password?', 10 | 'register' => 'Sign up', 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/my.php: -------------------------------------------------------------------------------- 1 | 'Your progress in studying SICP', 5 | ]; 6 | -------------------------------------------------------------------------------- /resources/lang/en/progresses.php: -------------------------------------------------------------------------------- 1 | 'Chapter', 5 | 'сhapters' => 'Chapters', 6 | 'my_solutions' => 'My Solutions', 7 | 'exercise' => 'Exercise', 8 | 'see_details' => 'See details', 9 | 'solutions' => 'Solutions', 10 | 'exercises' => 'Exercises', 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/en/register.php: -------------------------------------------------------------------------------- 1 | 'Registration', 5 | 'email' => 'Email', 6 | 'name' => 'Name', 7 | 'password' => 'Password', 8 | 'password_confirmation' => 'Confirm password', 9 | 'submit' => 'Sign up', 10 | 'login' => 'Log in', 11 | 'reset_password' => 'Forgot Your Password?', 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/en/settings.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'name' => 'Name', 6 | 'github_name' => 'GitHub nickname', 7 | 'hexlet_nickname' => 'Hexlet nickname', 8 | ], 9 | 'account' => [ 10 | 'password' => 'Password', 11 | 'reset_password' => 'Reset password', 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/breadcrumb.php: -------------------------------------------------------------------------------- 1 | 'Оглавление', 5 | 'exercise' => 'Упражнение', 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/ru/errors.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'title' => '404 – Ура! Вы сломали сайт', 6 | 'subtitle' => "Такой страницы не существует или произошла какая-то ужасная ошибка", 7 | 'button' => 'Вернуться на главную страницу', 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_1.php: -------------------------------------------------------------------------------- 1 | 'Последовательность выражений', 5 | 'description' => 6 | 'Ниже приведена последовательность выражений. ' . 7 | 'Какой результат напечатает интерпретатор в ответ на каждое из них? ' . 8 | 'Предполагается, что выражения вводятся в том же порядке, в каком они написаны.', 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_2.php: -------------------------------------------------------------------------------- 1 | 'В префиксной форме', 5 | 'description' => 'Переведите следующее выражение в префиксную форму:', 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_21.php: -------------------------------------------------------------------------------- 1 | 'Наименьший делитель', 5 | 'description' => [ 6 | '1' => 7 | 'С помощью процедуры ', 8 | '2' => 9 | ' найдите наименьший делитель следующих чисел: 199, 1999, 19999.', 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_3.php: -------------------------------------------------------------------------------- 1 | 'Сумма квадратов', 5 | 'description' => [ 6 | '1' => 7 | 'Определите процедуру ', 8 | '2' => 9 | ', которая принимает в качестве аргументов три числа и возвращает сумму квадратов двух больших из них.', 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_30.php: -------------------------------------------------------------------------------- 1 | 'Итерация', 5 | 'description' => [ 6 | '1' => 7 | "Процедура ", 8 | '2' => 9 | " порождает линейную рекурсию. Ее можно переписать так, чтобы суммирование выполнялось итеративно. " . 10 | "Покажите, как сделать это, заполнив пропущенные выражения в следующем определении:", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_34.php: -------------------------------------------------------------------------------- 1 | 'Вычислить комбинацию', 5 | 'description' => [ 6 | '1' => 7 | "Допустим, мы определили процедуру", 8 | '2' => 9 | "Тогда мы имеем", 10 | '3' => 11 | "Что случится, если мы (извращенно) попросим интерпретатор вычислить комбинацию ", 12 | '4' => 13 | "? Объясните.", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/1_4.php: -------------------------------------------------------------------------------- 1 | 'Составные выражения', 5 | 'description' => 6 | 'Заметим, что наша модель вычислений разрешает существование комбинаций, операторы которых — составные выражения. ' . 7 | 'С помощью этого наблюдения опишите, как работает следующая процедура:', 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_10.php: -------------------------------------------------------------------------------- 1 | 'Интервал, пересекающий ноль', 5 | 'description' => 6 | 'Бен Битобор, системный программист-эксперт, смотрит через плечо Лизы и замечает: неясно, что должно означать деление на интервал, пересекающий ноль. ' . 7 | 'Модифицируйте код Лизы так, чтобы программа проверяла это условие и сообщала об ошибке, если оно возникает.', 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_17.php: -------------------------------------------------------------------------------- 1 | 'Последний элемент списка', 5 | 'description' => [ 6 | '1' => 7 | "Определите процедуру ", 8 | '2' => 9 | ", которая возвращает список, содержащий только последний элемент данного (непустого) списка.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_18.php: -------------------------------------------------------------------------------- 1 | 'Переворот списка', 5 | 'description' => [ 6 | '1' => 7 | "Определите процедуру ", 8 | '2' => 9 | ", которая принимает список как аргумент и возвращает список, состоящий из тех же элементов в обратном порядке:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_25.php: -------------------------------------------------------------------------------- 1 | 'Извлечение 7 из списков', 5 | 'description' => [ 6 | '1' => 7 | "Укажите комбинации ", 8 | '2' => 9 | " и ", 10 | '3' => 11 | ", которые извлекают ", 12 | '4' => 13 | " из следующих списков:", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_26.php: -------------------------------------------------------------------------------- 1 | 'Выражения с двумя списками', 5 | 'description' => [ 6 | '1' => 7 | "Допустим, мы определили ", 8 | '2' => 9 | " и ", 10 | '3' => 11 | " как два списка:", 12 | '4' => 13 | "Какой результат напечатает интерпретатор в ответ на следующие выражения:", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_28.php: -------------------------------------------------------------------------------- 1 | 'Список листьев дерева', 5 | 'description' => [ 6 | '1' => 7 | "Напишите процедуру ", 8 | '2' => 9 | ", которая берет в качестве аргумента дерево (представленное в виде списка) и возвращает список, элементы которого — все листья дерева, упорядоченные слева направо. Например,", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_31.php: -------------------------------------------------------------------------------- 1 | 'Отображение дерева', 5 | 'description' => [ 6 | '1' => 7 | "Абстрагируйте свой ответ на упражнение ", 8 | '2' => 9 | ", получая процедуру ", 10 | '3' => 11 | ", так, чтобы ", 12 | '4' => 13 | " можно было определить следующим образом:", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_33.php: -------------------------------------------------------------------------------- 1 | 'Списковые операции в виде накопления', 5 | 'description' => 6 | "Заполните пропущенные выражения, так, чтобы получились определения некоторых базовых операций по работе со списками в виде накопления:", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_35.php: -------------------------------------------------------------------------------- 1 | 'Count-leaves в виде накопления', 5 | 'description' => [ 6 | '1' => 7 | "Переопределите ", 8 | '2' => 9 | " из раздела 2.2.2 в виде накопления:", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_39.php: -------------------------------------------------------------------------------- 1 | 'Реверс через свёртки', 5 | 'description' => [ 6 | '1' => 7 | "Закончите следующие определения ", 8 | '2' => 9 | " (упражнение ", 10 | '3' => 11 | ") в терминах процедур ", 12 | '4' => 13 | " и ", 14 | '5' => 15 | " из упражнения ", 16 | '6' => 17 | ":", 18 | ], 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_47.php: -------------------------------------------------------------------------------- 1 | "Реализация рамок", 5 | 'description' => [ 6 | '1' => 7 | "Вот два варианта конструкторов для рамок", 8 | '2' => 9 | "К каждому из этих конструкторов добавьте соответствующие селекторы, так, чтобы получить реализацию рамок.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_53.php: -------------------------------------------------------------------------------- 1 | 'Вычисление выражений', 5 | 'description' => 6 | "Что напечатает интерпретатор в ответ на каждое из следующих выражений?", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_55.php: -------------------------------------------------------------------------------- 1 | "Выражения с кавычками", 5 | 'description' => [ 6 | '1' => 7 | "Ева Лу Атор вводит при работе с интерпретатором выражение", 8 | '2' => 9 | "К ее удивлению, интерпретатор печатает ", 10 | '3' => 11 | ". Объясните.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_59.php: -------------------------------------------------------------------------------- 1 | 'Объединение множеств представленных неупорядоченными списками', 5 | 'description' => [ 6 | '1' => 7 | "Реализуйте операцию ", 8 | '2' => 9 | " для представления множеств в виде неупорядоченных списков.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_62.php: -------------------------------------------------------------------------------- 1 | 'Объединение множеств представленных упорядоченными списками', 5 | 'description' => [ 6 | '1' => 7 | "Дайте представление порядка ", 8 | '2' => 9 | " для операции ", 10 | '3' => 11 | " с представлением в виде упорядоченных списков.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_66.php: -------------------------------------------------------------------------------- 1 | 'Процедура lookup', 5 | 'description' => [ 6 | '1' => 7 | "Реализуйте процедуру ", 8 | '2' => 9 | " для случая, когда множество записей организовано в виде бинарного дерева, отсортированного по числовым значениям ключей.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_67.php: -------------------------------------------------------------------------------- 1 | "Раскодирование сообщения", 5 | 'description' => [ 6 | '1' => 7 | "Пусть нам даны дерево кодирования и пример сообщения:", 8 | '2' => 9 | "Раскодируйте сообщение при помощи процедуры ", 10 | '3' => 11 | ".", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_75.php: -------------------------------------------------------------------------------- 1 | 'Конструктор make-from-mag-ang в стиле передачи сообщений', 5 | 'description' => [ 6 | '1' => 7 | "Реализуйте в стиле передачи сообщений конструктор ", 8 | '2' => 9 | ". Он должен быть аналогичен приведенной выше процедуре ", 10 | '3' => 11 | ".", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_79.php: -------------------------------------------------------------------------------- 1 | 'Обобщенный предикат равенства equ?', 5 | 'description' => [ 6 | '1' => 7 | "Определите обобщенный предикат равенства ", 8 | '2' => 9 | ", который проверяет два числа на равенство, и вставьте его в пакет обобщенной арифметики. " . 10 | "Операция должна работать для обычных чисел, рациональных и комплексных.", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_8.php: -------------------------------------------------------------------------------- 1 | 'Разность интервалов', 5 | 'description' => [ 6 | '1' => 7 | 'Рассуждая в духе Лизы, опишите, как можно вычислить разность двух интервалов. ' . 8 | 'Напишите соответствующую процедуру вычитания, называемую ', 9 | '2' => 10 | '.', 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_80.php: -------------------------------------------------------------------------------- 1 | 'Обобщенный предикат =zero?', 5 | 'description' => [ 6 | '1' => 7 | "Определите обобщенный предикат ", 8 | '2' => 9 | ", который проверяет, равен ли его аргумент нулю, и вставьте его в пакет обобщенной арифметики. " . 10 | "Предикат должен работать для обычных, рациональных и комплексных чисел.", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_87.php: -------------------------------------------------------------------------------- 1 | '=zero? для многочленов', 5 | 'description' => [ 6 | '1' => 7 | "Установите ", 8 | '2' => 9 | " для многочленов в обобщенный арифметический пакет. Это позволит ", 10 | '3' => 11 | " работать с многочленами, чьи коэффициенты сами по себе многочлены.", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_88.php: -------------------------------------------------------------------------------- 1 | 'Вычитание многочленов', 5 | 'description' => 6 | "Расширьте систему многочленов так, чтобы она включала вычитание многочленов. " . 7 | "(Подсказка: может оказаться полезным определить обобщенную операцию смены знака.)", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_89.php: -------------------------------------------------------------------------------- 1 | 'Процедуры для плотных многочленов', 5 | 'description' => 6 | "Определите процедуры, которые реализуют представление в виде списка термов, описанное выше как подходящее для плотных многочленов.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/2_92.php: -------------------------------------------------------------------------------- 1 | 'Сложение и умножение многочленов с несколькими переменными', 5 | 'description' => 6 | "Использовав упорядочение переменных, расширьте пакет работы с многочленами так, чтобы сложение и умножение многочленов работало для многочленов с несколькими переменными. (Это не простая задача!)", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_15.php: -------------------------------------------------------------------------------- 1 | 'Стрелочные диаграммы', 5 | 'description' => [ 6 | '1' => 7 | 'Нарисуйте стрелочные диаграммы, объясняющие, как ', 8 | '2' => 9 | ' действует на структуры ', 10 | '3' => 11 | ' и ', 12 | '4' => 13 | ' из этого раздела.', 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_19.php: -------------------------------------------------------------------------------- 1 | 'Оптимизируйте использование памяти', 5 | 'description' => [ 6 | '1' => 7 | 'Переделайте упражнение ', 8 | '2' => 9 | ', используя фиксированное количество памяти. ' . 10 | '(Тут нужна достаточно хитрая идея.)', 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_20.php: -------------------------------------------------------------------------------- 1 | 'Нарисуйте диаграммы окружений', 5 | 'description' => [ 6 | '1' => 7 | 'Нарисуйте диаграммы окружений, изображающие выполнение последовательности выражений', 8 | '2' => 9 | ' с помощью вышеприведенной процедурной реализации пар. ' . 10 | '(Сравните с упражнением ', 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_28.php: -------------------------------------------------------------------------------- 1 | 'ИЛИ-элемент как элементарный функциональный блок', 5 | 'description' => [ 6 | '1' => 7 | "Определите ИЛИ-элемент как элементарный функциональный блок. Ваш конструктор ", 8 | '2' => 9 | "должен быть подобен ", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_39.php: -------------------------------------------------------------------------------- 1 | 'Сохранившиеся исходы', 5 | 'description' => 6 | "Какие из пяти возможных исходов параллельного выполнения сохраняются, если мы сериализуем выполнение таким образом:", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_40.php: -------------------------------------------------------------------------------- 1 | "Все возможные значения x", 5 | 'description' => [ 6 | '1' => 7 | "Укажите все возможные значения ", 8 | '2' => 9 | " при выполнении", 10 | '3' => 11 | "Какие из них сохраняются, если вместо этого мы выполняем сериализованные процедуры:", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_51.php: -------------------------------------------------------------------------------- 1 | "Значение выражений", 5 | 'description' => [ 6 | '1' => 7 | "Чтобы внимательнее изучить задержанные вычисления, мы воспользуемся следующей процедурой, которая печатает свой аргумент, а затем возвращает его:", 8 | '2' => 9 | "Что печатает интерпретатор в ответ на каждое выражение из следующей последовательности?", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_53.php: -------------------------------------------------------------------------------- 1 | 'Описание элементов потока', 5 | 'description' => 6 | "Не запуская программу, опишите элементы потока, порождаемого", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_72.php: -------------------------------------------------------------------------------- 1 | 'Поток чисел, которые можно записать как сумму двух квадратов', 5 | 'description' => [ 6 | '1' => 7 | "Используя метод, подобный описанному в упражнении ", 8 | '2' => 9 | ", породите поток всех чисел, которые можно записать как сумму двух квадратов тремя различными способами (и покажите, каковы эти способы).", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/3_79.php: -------------------------------------------------------------------------------- 1 | 'Обобщение процедуры solve-2nd', 5 | 'description' => [ 6 | '1' => 7 | "Обобщите процедуру ", 8 | '2' => 9 | " из упражнения ", 10 | '3' => 11 | " так, чтобы с ее помощью можно было решать дифференциальные уравнения второго порядка общего вида ", 12 | '4' => 13 | ".", 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_11.php: -------------------------------------------------------------------------------- 1 | 'Перепишите операции с окружениями', 5 | 'description' => "Вместо того, чтобы представлять кадр в виде списка списков, его можно представить как список " . 6 | "связываний, где каждое связывание является парой из имени и значения. Перепишите операции с окружениями в " . 7 | "соответствии с этим альтернативным представлением.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_22.php: -------------------------------------------------------------------------------- 1 | 'Расширьте интерпретатор', 5 | 'description' => [ 6 | '1' => 7 | "Расширьте интерпретатор из этого раздела так, чтобы он поддерживал ", 8 | '2' => 9 | ". См. упражнение ", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_24.php: -------------------------------------------------------------------------------- 1 | 'Проведите несколько экспериментов', 5 | 'description' => "Спроектируйте и проведите несколько экспериментов, чтобы сравнить скорость исходного " . 6 | "метациклического вычислителя и его версии из этого раздела. С помощью результатов этих опытов оцените " . 7 | "долю времени, которая тратится на анализ и на собственно выполнение в различных процедурах.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_27.php: -------------------------------------------------------------------------------- 1 | 'Взаимодействие между ленивыми вычислениями и побочными эффектами', 5 | 'description' => [ 6 | '1' => "Допустим, мы вводим в ленивый интерпретатор следующее выражение:", 7 | '2' => "Вставьте пропущенные значения в данной ниже последовательности действий и объясните свои ответы:", 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_32.php: -------------------------------------------------------------------------------- 1 | 'Разница между потоками и ленивыми списками', 5 | 'description' => "Приведите несколько примеров, которые показывают разницу между потоками из главы 3 и " . 6 | "«более ленивыми» списками, описанными в этом разделе. Как можно воспользоваться этой дополнительной ленивостью?", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_37.php: -------------------------------------------------------------------------------- 1 | 'Эффективность порождения Пифагоровых троек', 5 | 'description' => [ 6 | '1' => "Бен Битобор утверждает, что следующий метод порождения Пифагоровых троек эффективнее, чем " . 7 | "приведенный в упражнении ", 8 | '2' => ". Прав ли он? (Подсказка: найдите, сколько вариантов требуется рассмотреть.)", 9 | ], 10 | ]; 11 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_38.php: -------------------------------------------------------------------------------- 1 | 'Измените процедуру multiple-dwelling', 5 | 'description' => [ 6 | '1' => 7 | "Измените процедуру ", 8 | '2' => 9 | ", отказавшись от требования, что Смит и Флетчер живут не на соседних этажах." . 10 | " Сколько решений имеется у измененной загадки?", 11 | ], 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_41.php: -------------------------------------------------------------------------------- 1 | 'Решите задачу о проживании', 5 | 'description' => "Напишите процедуру для решения задачи о проживании на обычной Scheme.", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_48.php: -------------------------------------------------------------------------------- 1 | "Дополнение грамматики", 5 | 'description' => 6 | "Дополните описанную выше грамматику так, чтобы она могла работать с более сложными предложениями. Например, можно позволить именным и глагольным группам включать прилагательные и наречия, или же можно обрабатывать сложные предложения.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_50.php: -------------------------------------------------------------------------------- 1 | "Особая форма ramb", 5 | 'description' => [ 6 | '1' => 7 | "Реализуйте новую особую форму ", 8 | '2' => 9 | ", которая подобна ", 10 | '3' => 11 | ", однако перебирает варианты не слева направо, а в случайном порядке. Покажите, как такая форма может пригодиться в Лизиной задаче из упражнения ", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_53.php: -------------------------------------------------------------------------------- 1 | "Результат вычисления", 5 | 'description' => [ 6 | '1' => 7 | "Если у нас есть ", 8 | '2' => 9 | ", описанное в упражнении ", 10 | '3' => 11 | ", и ", 12 | '4' => 13 | " из упражнения ", 14 | '5' => 15 | ", то каков будет результат вычисления", 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_58.php: -------------------------------------------------------------------------------- 1 | "Правило «независим»", 5 | 'description' => 6 | "Определите правило, которое говорит, что человек «независим» в своем отделе, если он работает в этом отделе, но у него нет начальника, который работает в том же отделе.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_61.php: -------------------------------------------------------------------------------- 1 | "Правила для отношения next-to", 5 | 'description' => [ 6 | '1' => 7 | "Следующие правила определяют отношение ", 8 | '2' => 9 | ", которое находит в списке соседние элементы:", 10 | '3' => 11 | "Каков будет ответ на следующие запросы?", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/4_73.php: -------------------------------------------------------------------------------- 1 | "Явное испольование delay во flatten-stream", 5 | 'description' => [ 6 | '1' => 7 | "Почему ", 8 | '2' => 9 | " использует ", 10 | '3' => 11 | " явно? Что было бы неправильно в таком определении:", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_1.php: -------------------------------------------------------------------------------- 1 | "Регистровая машина", 5 | 'description' => 6 | "Спроектируйте регистровую машину для вычисления факториалов с помощью итеративного алгоритма, задаваемого следующей процедурой. Нарисуйте для этой машины диаграммы путей данных 7 | и контроллера.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_10.php: -------------------------------------------------------------------------------- 1 | "Новый синтаксис для команд регистровой машины", 5 | 'description' => "Придумайте новый синтаксис для команд регистровой машины и измените имитатор так, чтобы он " . 6 | "использовал Ваш новый синтаксис. Можете ли Вы реализовать свой синтаксис, ничего не трогая, кроме " . 7 | "синтаксических процедур из этого раздела?", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_15.php: -------------------------------------------------------------------------------- 1 | "Подсчет команд", 5 | 'description' => 6 | "Добавьте к модели регистровой машины подсчет команд (instruction counting). Это значит, что машина должна подсчитывать число выполненных ею команд. " . 7 | "Расширьте интерфейс модели и добавьте новое сообщение, которое печатает счетчик команд и переустанавливает его в ноль.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_2.php: -------------------------------------------------------------------------------- 1 | 'Опишите итеративную факториал-машину', 5 | 'description' => "С помощью языка регистровых машин опишите итеративную факториал-машину из упражнения ", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_25.php: -------------------------------------------------------------------------------- 1 | "Вычислитель с нормальным порядков вычислений, на основе ленивого интерпретатора", 5 | 'description' => 6 | "Измените вычислитель так, чтобы он использовал нормальный порядок вычислений, на основе ленивого интерпретатора из раздела 4.2.", 7 | ]; 8 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_35.php: -------------------------------------------------------------------------------- 1 | "Пример вывода компилятора", 5 | 'description' => [ 6 | '1' => 7 | "При компиляции какого выражения был получен код на рисунке 5.18?", 8 | '2' => 9 | "Рис. 5.18. Пример вывода компилятора.", 10 | ], 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_5.php: -------------------------------------------------------------------------------- 1 | "Смоделируйте работу факториальной машины и машины Фибоначчи", 5 | 'description' => "Смоделируйте вручную работу факториальной машины и машины Фибоначчи с каким-нибудь " . 6 | "нетривиальным значением на входе (чтобы потребовался хотя бы один рекурсивный вызов). Покажите " . 7 | "содержимое стека в каждый момент выполнения.", 8 | ]; 9 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_6.php: -------------------------------------------------------------------------------- 1 | "Команды save и restore", 5 | 'description' => [ 6 | '1' => 7 | "Бен Битобор утверждает, что последовательность команд машины Фибоначчи содержит одну лишнюю команду ", 8 | '2' => 9 | " и одну лишнюю ", 10 | '3' => 11 | ", которые можно убрать и получить более быструю машину. Что это за команды?", 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/lang/ru/exercises/5_7.php: -------------------------------------------------------------------------------- 1 | "Проверьте машины на имитаторе", 5 | 'description' => "Проверьте на имитаторе машины, построенные Вами в упражнении ", 6 | ]; 7 | -------------------------------------------------------------------------------- /resources/lang/ru/login.php: -------------------------------------------------------------------------------- 1 | 'Войти', 5 | 'remember_me' => 'Запомнить меня', 6 | 'email' => 'Электронная почта', 7 | 'password' => 'Пароль', 8 | 'reset_password' => 'Забыли пароль?', 9 | 'submit' => 'Войти', 10 | 'register' => 'Зарегистрироваться', 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/my.php: -------------------------------------------------------------------------------- 1 | 'Ваш прогресс в изучении материалов книги СИКП', 5 | ]; 6 | -------------------------------------------------------------------------------- /resources/lang/ru/progresses.php: -------------------------------------------------------------------------------- 1 | 'Глава', 5 | 'сhapters' => 'Главы', 6 | 'my_solutions' => 'Мои Решения', 7 | 'exercise' => 'Упражнение', 8 | 'see_details' => 'Подробнее', 9 | 'solutions' => 'Решения', 10 | 'exercises' => 'Упражнения', 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/lang/ru/register.php: -------------------------------------------------------------------------------- 1 | 'Регистрация', 5 | 'name' => 'Имя', 6 | 'email' => 'Электронная почта', 7 | 'password' => 'Пароль', 8 | 'password_confirmation' => 'Подтверждение пароля', 9 | 'submit' => 'Зарегистрироваться', 10 | 'login' => 'Войти', 11 | 'reset_password' => 'Забыли пароль?', 12 | ]; 13 | -------------------------------------------------------------------------------- /resources/lang/ru/settings.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'name' => 'Имя', 6 | 'github_name' => 'Ник в GitHub', 7 | 'hexlet_nickname' => 'Ник в Hexlet', 8 | ], 9 | 'account' => [ 10 | 'password' => 'Пароль', 11 | 'reset_password' => 'Сбросить пароль', 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /resources/sass/_icons.scss: -------------------------------------------------------------------------------- 1 | .icon-lg { 2 | font-size: 1.5rem; 3 | } 4 | 5 | .icon-4x { 6 | font-size: 4rem; 7 | } 8 | 9 | .icon-2x { 10 | font-size: 2rem; 11 | } -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Typography 2 | $font-family-sans-serif: 'Onest', sans-serif; 3 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Bootstrap 2 | @import 'variables'; 3 | @import 'activity_chart'; 4 | @import 'custom'; 5 | @import 'icons'; 6 | @import 'bootstrap/scss/bootstrap'; 7 | @import 'breakpoints'; 8 | 9 | // NOTE: move if it will be necessary. It should be do for the site. 10 | // TODO grep and replace by .bd-gray-200 11 | // https://getbootstrap.com/docs/5.0/customize/color/ 12 | 13 | 14 | -------------------------------------------------------------------------------- /resources/views/components/bs/form/checkbox.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ html()->checkbox($name)->class('form-check-input') }} 3 | {{ html()->label(__($label))->for($name)->class('form-label') }} 4 |
5 | -------------------------------------------------------------------------------- /resources/views/components/bs/form/email.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ html()->label(__($label))->for($name)->class('form-label') }} 3 | {{ html()->email($name)->class(['form-control', 'is-invalid' => $errors->has($name)]) }} 4 | @error($name) 5 | {{ $errors->first($name) }} 6 | @enderror 7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/bs/form/password.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ html()->label(__($label))->for($name)->class('form-label') }} 3 | {{ html()->password($name)->class(['form-control', 'is-invalid' => $errors->has($name)]) }} 4 | @error($name) 5 | {{ $errors->first($name) }} 6 | @enderror 7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/bs/form/submit.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ html()->submit(__($text ?? 'layout.submit'))->class('btn btn-primary btn-block') }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/components/bs/form/text.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ html()->label(__($label))->for($name)->class('form-label') }} 3 | {{ html()->text($name)->class(['form-control', 'is-invalid' => $errors->has($name)]) }} 4 | @error($name) 5 | {{ $message }} 6 | @enderror 7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/comment/_modal.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | /** 3 | * @var \Illuminate\Database\Eloquent\Model $model 4 | * @var string $modalTitle 5 | * @var string $content 6 | * @var string $submitLabel 7 | * @var string $method 8 | */ 9 | @endphp 10 | -------------------------------------------------------------------------------- /resources/views/components/hreflang_tags.blade.php: -------------------------------------------------------------------------------- 1 | @foreach ($languageUrls as $language => $url) 2 | 3 | @endforeach 4 | -------------------------------------------------------------------------------- /resources/views/components/solution.blade.php: -------------------------------------------------------------------------------- 1 |
2 |     {{ $solution->content }}
3 | 
4 | -------------------------------------------------------------------------------- /resources/views/components/sorting_widget.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{ $name }} 3 | @switch($sortParams) 4 | @case("-{$nameParams}") 5 | 6 | @break 7 | 8 | @case($nameParams) 9 | 10 | @break 11 | 12 | @default 13 | @endswitch 14 | 15 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_12.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_12.description.1') }}

2 |
    1
 3 |    1 1
 4 |   1 2 1
 5 |  1 3 3 1
 6 | 1 4 6 4 1
 7 |    ...
 8 | 
9 |

{{ __('exercises/1_12.description.2') }}

10 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_14.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_14.description.1') }} 2 | count-change 3 | {{ __('exercises/1_14.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_18.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_18.description.1') }}1.16 2 | {{ __('exercises/1_18.description.2') }}1.17 3 | {{ __('exercises/1_18.description.3') }} 4 | mul-iter 5 | {{ __('exercises/1_18.description.4') }}

6 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_2.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_2.description') }}

2 |
5 + 4 + (2 − (3 − (6 + 4/5)))
3 | -----------------------------
4 |       3(6 - 2)(2 - 7)
5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_21.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_21.description.1') }} 2 | smallest-divisor 3 | {{ __('exercises/1_21.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_24.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_24.description.1') }} 2 | timed-prime-test 3 | {{ __('exercises/1_24.description.2') }} 4 | 1.22 5 | {{ __('exercises/1_24.description.3') }} 6 | fast-prime? 7 | {{ __('exercises/1_24.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_25.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_25.description.1') }} 2 | expmod 3 | {{ __('exercises/1_25.description.2') }} 4 |

5 |
(define (expmod base exp m)
6 |   (remainder (fast-expt base exp) m))
7 | 
8 |

{{ __('exercises/1_25.description.3') }}

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_3.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_3.description.1') }} 2 | solution 3 | {{ __('exercises/1_3.description.2') }}

4 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_30.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_30.description.1') }} 2 | sum 3 | {{ __('exercises/1_30.description.2') }} 4 |

5 |
(define (sum term a next b)
 6 |   (define (iter a result)
 7 |     (if <??>
 8 |         <??>
 9 |         (iter <??> <??>)))
10 | (iter <??> <??>))
11 | 
12 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_34.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_34.description.1') }}

2 |
(define (f g)
 3 |   (g 2))
 4 | 
5 |

{{ __('exercises/1_34.description.2') }}

6 |
(f square)
 7 | 4
 8 | 
 9 | (f (lambda (z) (* z (+ z 1))))
10 | 6
11 | 
12 |

{{ __('exercises/1_34.description.3') }} 13 | (f f) 14 | {{ __('exercises/1_34.description.4') }} 15 |

16 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_35.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_35.description.1') }} 2 | φ 3 | {{ __('exercises/1_35.description.2') }} 4 | x → 1 + 1/x 5 | {{ __('exercises/1_35.description.3') }} 6 | φ 7 | {{ __('exercises/1_35.description.4') }} 8 | fixed-point 9 | {{ __('exercises/1_35.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_4.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_4.description') }}

2 |
(define (a-plus-abs-b a b)
3 |   ((if (> b 0) + -) a b))
4 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_40.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_40.description.1') }} 2 | cubic 3 | {{ __('exercises/1_40.description.2') }} 4 | newtons-method 5 | {{ __('exercises/1_40.description.3') }} 6 |

7 |
(newtons-method (cubic a b c) 1)
 8 | 
9 |

{{ __('exercises/1_40.description.4') }} 10 | x³ + ax² + bx + c 11 | {{ __('exercises/1_40.description.5') }} 12 |

13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_5.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_5.description.1') }}

2 |
(define (p) (p))
 3 | 
 4 | (define (test x y)
 5 |     (if (= x 0)
 6 |         0
 7 |         y))
8 |

{{ __('exercises/1_5.description.2') }}

9 |
(test 0 (p))
10 |

{{ __('exercises/1_5.description.3') }}

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_7.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_7.description.1') }} 2 | good-enough? 3 | {{ __('exercises/1_7.description.2') }} 4 | good-enough? 5 | {{ __('exercises/1_7.description.3') }} 6 | guess 7 | {{ __('exercises/1_7.description.4') }} 8 | square-root 9 | {{ __('exercises/1_7.description.5') }}

10 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/1_8.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/1_8.description.1') }}

2 |
x/(y * y) + 2y
3 | --------------
4 |       3
5 |

{{ __('exercises/1_8.description.2') }} 6 | cube-root 7 | {{ __('exercises/1_8.description.3') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_1.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_1.description.1') }} 2 | make-rat 3 | {{ __('exercises/2_1.description.2') }} 4 | Make-rat 5 | {{ __('exercises/2_1.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_10.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_10.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_11.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_11.description.1') }} 2 | mul-interval 3 | {{ __('exercises/2_11.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_12.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_12.description.1') }} 2 | make-center-percent 3 | {{ __('exercises/2_12.description.2') }} 4 | percent 5 | {{ __('exercises/2_12.description.3') }} 6 | center 7 | {{ __('exercises/2_12.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_13.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_13.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_15.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_15.description.1') }} 2 | par2 3 | {{ __('exercises/2_15.description.2') }} 4 | par1 5 | {{ __('exercises/2_15.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_16.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_16.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_17.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_17.description.1') }} 2 | last-pair 3 | {{ __('exercises/2_17.description.2') }} 4 |

5 |
(last-pair (list 23 72 149 34))
6 | (34)
7 | 
8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_18.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_18.description.1') }} 2 | reverse 3 | {{ __('exercises/2_18.description.2') }} 4 |

5 |
(reverse (list 1 4 9 16 25))
6 | (25 16 9 4 1)
7 | 
8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_24.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_24.description.1') }} 2 | (list 1 (list 2 (list 3 4))) 3 | {{ __('exercises/2_24.description.2') }} 4 |

5 | 2.24 6 |

{{ __('exercises/2_24.description.3') }}

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_25.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_25.description.1') }} 2 | car 3 | {{ __('exercises/2_25.description.2') }} 4 | cdr 5 | {{ __('exercises/2_25.description.3') }} 6 | 7 7 | {{ __('exercises/2_25.description.4') }} 8 |

9 |
(1 3 (5 7) 9)
10 | 
11 | ((7))
12 | 
13 | (1 (2 (3 (4 (5 (6 7))))))
14 | 
15 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_28.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_28.description.1') }} 2 | fringe 3 | {{ __('exercises/2_28.description.2') }} 4 |

5 |
(define x (list (list 1 2) (list 3 4)))
 6 | 
 7 | (fringe x)
 8 | (1 2 3 4)
 9 | 
10 | (fringe (list x x))
11 | (1 2 3 4 1 2 3 4)
12 | 
13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_3.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_3.description.1') }}2.2 2 | {{ __('exercises/2_3.description.2') }}

3 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_33.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_33.description') }}

2 |
(define (map p sequence)
 3 |   (accumulate (lambda (x y) <??>) nil sequence))
 4 | 
 5 | (define (append seq1 seq2)
 6 |   (accumulate cons <??> <??>))
 7 | 
 8 | (define (length sequence)
 9 |   (accumulate <??> 0 sequence))
10 | 
11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_35.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_35.description.1') }} 2 | count-leaves 3 | {{ __('exercises/2_35.description.2') }} 4 |

5 |
(define (count-leaves t)
6 |   (accumulate <??> <??> (map <??> <??>)))
7 | 
8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_41.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_41.description.1') }} 2 | i 3 | {{ __('exercises/2_41.description.2') }} 4 | j 5 | {{ __('exercises/2_41.description.3') }} 6 | k 7 | {{ __('exercises/2_41.description.4') }} 8 | n 9 | {{ __('exercises/2_41.description.5') }} 10 | s 11 | {{ __('exercises/2_41.description.6') }} 12 |

13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_47.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_47.description.1') }}

2 |
(define (make-frame-list origin edge1 edge2)
3 |   (list origin edge1 edge2))
4 | 
5 | (define (make-frame-cons origin edge1 edge2)
6 |   (cons origin (cons edge1 edge2)))
7 | 
8 |

{{ __('exercises/2_47.description.2') }}

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_50.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_50.description.1') }} 2 | flip-horiz 3 | {{ __('exercises/2_50.description.2') }} 4 | 180 5 | {{ __('exercises/2_50.description.3') }} 6 | 270 7 | {{ __('exercises/2_50.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_53.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_53.description') }}

2 |
(list 'a 'b 'c)
 3 | 
 4 | (list (list 'george))
 5 | 
 6 | (cdr '((x1 x2) (y1 y2)))
 7 | 
 8 | (cadr '((x1 x2) (y1 y2)))
 9 | 
10 | (pair? (car '(a short list)))
11 | 
12 | (memq 'red '((red shoes) (blue socks)))
13 | 
14 | (memq 'red '(red shoes blue socks))
15 | 
16 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_55.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_55.description.1') }}

2 |
(car ''abracadabra)
3 | 
4 |

{{ __('exercises/2_55.description.2') }} 5 | quote 6 | {{ __('exercises/2_55.description.3') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_57.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_57.description.1') }}

2 |
(deriv '(* x y (+ x 3)) 'x)
 3 | 
4 |

{{ __('exercises/2_57.description.2') }} 5 | deriv 6 | {{ __('exercises/2_57.description.3') }} 7 | addend 8 | {{ __('exercises/2_57.description.4') }} 9 | augend 10 | {{ __('exercises/2_57.description.5') }} 11 |

12 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_59.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_59.description.1') }} 2 | union-set 3 | {{ __('exercises/2_59.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_61.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_61.description.1') }} 2 | adjoin-set 3 | {{ __('exercises/2_61.description.2') }} 4 | element-of-set? 5 | {{ __('exercises/2_61.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_62.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_62.description.1') }} 2 | Θ(n) 3 | {{ __('exercises/2_62.description.2') }} 4 | union-set 5 | {{ __('exercises/2_62.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_66.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_66.description.1') }} 2 | lookup 3 | {{ __('exercises/2_66.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_7.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_7.description.1') }}

2 |
(define (make-interval a b) (cons a b))
 3 | 
4 |

{{ __('exercises/2_7.description.2') }} 5 | upper-bound 6 | {{ __('exercises/2_7.description.3') }} 7 | lower-bound 8 | {{ __('exercises/2_7.description.4') }} 9 |

10 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_71.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_71.description.1') }} 2 | n 3 | {{ __('exercises/2_71.description.2') }} 4 | 1, 2, 4, ..., 2ⁿ⁻¹ 5 | {{ __('exercises/2_71.description.3') }} 6 | n = 5 7 | {{ __('exercises/2_71.description.4') }} 8 | n = 10 9 | {{ __('exercises/2_71.description.5') }} 10 | n 11 | {{ __('exercises/2_71.description.6') }} 12 |

13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_72.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_72.description.1') }}2.68 2 | {{ __('exercises/2_72.description.2') }}2.71 3 | {{ __('exercises/2_72.description.3') }} 4 | n 5 | {{ __('exercises/2_72.description.4') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_75.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_75.description.1') }} 2 | make-from-mag-ang 3 | {{ __('exercises/2_75.description.2') }} 4 | make-from-real-imag 5 | {{ __('exercises/2_75.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_76.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_76.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_79.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_79.description.1') }} 2 | equ? 3 | {{ __('exercises/2_79.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_8.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_8.description.1') }} 2 | sub-interval 3 | {{ __('exercises/2_8.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_80.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_80.description.1') }} 2 | =zero? 3 | {{ __('exercises/2_80.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_82.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_82.description.1') }} 2 | apply-generic 3 | {{ __('exercises/2_82.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_83.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_83.description.1') }} 2 | raise 3 | {{ __('exercises/2_83.description.2') }} 4 |

5 | 2.83 6 |

{{ __('exercises/2_83.description.3') }}

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_84.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_84.description.1') }} 2 | raise 3 | {{ __('exercises/2_84.description.2') }} 4 | 2.83 5 | {{ __('exercises/2_84.description.3') }} 6 | apply-generic 7 | {{ __('exercises/2_84.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_86.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_86.description.1') }} 2 | sine 3 | {{ __('exercises/2_86.description.2') }} 4 | cosine 5 | {{ __('exercises/2_86.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_87.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_87.description.1') }} 2 | =zero? 3 | {{ __('exercises/2_87.description.2') }} 4 | adjoin-term 5 | {{ __('exercises/2_87.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_88.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_88.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_89.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_89.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_9.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_9.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_90.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_90.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/2_92.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/2_92.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_1.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_1.description.1') }} 3 | make-accumulator 4 | {{ __('exercises/3_1.description.2') }} 5 | make-accumulator 6 | {{ __('exercises/3_1.description.3') }} 7 |

8 |
(define A (make-accumulator 5))
 9 | (A 10)
10 | 15
11 | (A 10)
12 | 25
13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_15.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_15.description.1') }} 3 | set-to-wow! 4 | {{ __('exercises/3_15.description.2') }} 5 | z1 6 | {{ __('exercises/3_15.description.3') }} 7 | z2 8 | {{ __('exercises/3_15.description.4') }} 9 |

10 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_17.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_17.description.1') }} 3 | count-pairs 4 | {{ __('exercises/3_17.description.2') }} 5 | 3.16 6 | {{ __('exercises/3_17.description.3') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_18.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_18.description.1') }} 3 | cdr{{ __('exercises/3_18.description.2') }} 4 | 3.13 5 | {{ __('exercises/3_18.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_19.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_19.description.1') }} 3 | 3.18 4 | {{ __('exercises/3_19.description.2') }} 5 |

6 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_20.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_20.description.1') }} 3 |

4 |
(define x (cons 1 2))
 5 | (define z (cons x x))
 6 | (set-car! (cdr z) 17)
 7 | (car x)
 8 | 17
9 |

10 | {{ __('exercises/3_20.description.2') }} 11 | 3.11.) 12 |

13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_25.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_25.description.1') }} 3 | lookup 4 | {{ __('exercises/3_25.description.2') }} 5 | insert! 6 | {{ __('exercises/3_25.description.3') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_26.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_26.description.1') }} 3 | 2.3.3. 4 | {{ __('exercises/3_26.description.2') }} 5 | 2.66 6 | {{ __('exercises/3_26.description.3') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_28.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_28.description.1') }} 3 | or-gate 4 | {{ __('exercises/3_28.description.2') }} 5 | and-gate. 6 | 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_29.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_29.description.1') }} 3 | or-gate 4 | {{ __('exercises/3_29.description.2') }} 5 | and-gate-delay 6 | {{ __('exercises/3_29.description.3') }} 7 | inverter-delay? 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_30.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_30.description.1') }} 3 | ripple-carry-adder{{ __('exercises/3_30.description.2') }} 4 |

5 | 3.30 6 |

{{ __('exercises/3_30.description.3') }}

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_32.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_32.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_34.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_34.description.1') }} 3 | b 4 | {{ __('exercises/3_34.description.2') }} 5 | a 6 | {{ __('exercises/3_34.description.3') }} 7 |

8 |
(define (squarer a b)
 9 |   (multiplier a a b))
10 | 
11 |

{{ __('exercises/3_34.description.4') }}

12 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_39.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_39.description') }}

2 |
(define x 10)
3 | 
4 | (define s (make-serializer))
5 | 
6 | (parallel-execute (lambda () (set! x ((s (lambda () (* x x))))))
7 |                   (s (lambda () (set! x (+ x 1)))))
8 | 
9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_4.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ __('exercises/3_4.description.1') }} 3 | make-account 4 | {{ __('exercises/3_4.description.2') }} 5 | 3.3 6 | {{ __('exercises/3_4.description.3') }} 7 | call-the-cops 8 | {{ __('exercises/3_4.description.4') }} 9 |

10 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_43.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_43.description.1') }} 2 | exchange 3 | {{ __('exercises/3_43.description.2') }} 4 |

5 | 3.43 6 |

{{ __('exercises/3_43.description.3') }}

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_46.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_46.description.1') }} 2 | test-and-set! 3 | {{ __('exercises/3_46.description.2') }} 4 |

5 | 3.46 6 |

{{ __('exercises/3_46.description.3') }}

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_47.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_47.description.1') }} 2 | n 3 | {{ __('exercises/3_47.description.2') }} 4 | n 5 | {{ __('exercises/3_47.description.3') }} 6 |

7 |

{{ __('exercises/3_47.description.4') }}

8 |

{{ __('exercises/3_47.description.5') }} 9 | test-and-set! 10 | {{ __('exercises/3_47.description.6') }} 11 |

12 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_48.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_48.description.1') }} 2 | serialized-exchange 3 | {{ __('exercises/3_48.description.2') }} 4 | make-account 5 | {{ __('exercises/3_48.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_49.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_49.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_51.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_51.description.1') }}

2 |
(define (show x)
 3 |   (display-line x)
 4 |   x)
 5 | 
6 |

{{ __('exercises/3_51.description.2') }}

7 |
(define x (stream-map show (stream-enumerate-interval 0 10)))
 8 | 
 9 | (stream-ref x 5)
10 | 
11 | (stream-ref x 7)
12 | 
13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_53.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_53.description') }}

2 |
(define s (cons-stream 1 (add-streams s s)))
3 | 
4 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_64.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_64.description.1') }} 2 | stream-limit 3 | {{ __('exercises/3_64.description.2') }} 4 |

5 |
(define (sqrt x tolerance)
6 |   (stream-limit (sqrt-stream x) tolerance))
7 | 
8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_65.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_65.description.1') }}

2 | 3.65 3 |

{{ __('exercises/3_65.description.2') }} 4 | 2 5 | {{ __('exercises/3_65.description.3') }} 6 | π 7 | {{ __('exercises/3_65.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_66.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_66.description.1') }} 2 | (pairs integers integers) 3 | {{ __('exercises/3_66.description.2') }} 4 | (1, 100) 5 | {{ __('exercises/3_66.description.3') }} 6 | (99, 100) 7 | {{ __('exercises/3_66.description.4') }} 8 | (100, 100) 9 | {{ __('exercises/3_66.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_67.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_67.description.1') }} 2 | (pairs integers integers) 3 | {{ __('exercises/3_67.description.2') }} 4 | (i, j) 5 | {{ __('exercises/3_67.description.3') }} 6 | i ≤ j 7 | {{ __('exercises/3_67.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_71.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_71.description.1') }} 2 | (i, j) 3 | {{ __('exercises/3_71.description.2') }} 4 | i³ + j³ 5 | {{ __('exercises/3_71.description.3') }} 6 | 3.70 7 | {{ __('exercises/3_71.description.4') }} 8 | 1729 9 | {{ __('exercises/3_71.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_72.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_72.description.1') }}3.71 2 | {{ __('exercises/3_72.description.2') }}

3 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_76.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_76.description.1') }}3.75 2 | {{ __('exercises/3_76.description.2') }} 3 | smooth 4 | {{ __('exercises/3_76.description.3') }} 5 | smooth 6 | {{ __('exercises/3_76.description.4') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_79.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_79.description.1') }} 2 | solve-2nd 3 | {{ __('exercises/3_79.description.2') }} 4 | 3.78 5 | {{ __('exercises/3_79.description.3') }} 6 | d²y/dt² = f(dy/dt, y) 7 | {{ __('exercises/3_79.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_81.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_81.description.1') }}3.6 2 | {{ __('exercises/3_81.description.2') }} 3 | generate 4 | {{ __('exercises/3_81.description.3') }} 5 | reset 6 | {{ __('exercises/3_81.description.4') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/3_82.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/3_82.description.1') }}3.5 2 | {{ __('exercises/3_82.description.2') }} 3 | estimate-integral 4 | {{ __('exercises/3_82.description.3') }} 5 |

6 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_10.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_10.description.1') }} 2 | eval 3 | {{ __('exercises/4_10.description.2') }} 4 | eval 5 | {{ __('exercises/4_10.description.3') }} 6 | apply 7 | {{ __('exercises/4_10.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_11.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_11.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_12.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_12.description.1') }} 2 | set-variable-value! 3 | {{ __('exercises/4_12.description.2') }} 4 | define-variable! 5 | {{ __('exercises/4_12.description.3') }} 6 | lookup-variable-value 7 | {{ __('exercises/4_12.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_13.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_13.description.1') }} 2 | define 3 | {{ __('exercises/4_13.description.2') }} 4 | make-unbound! 5 | {{ __('exercises/4_13.description.3') }} 6 | make-unbound! 7 | {{ __('exercises/4_13.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_14.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_14.description.1') }} 2 | map 3 | {{ __('exercises/4_14.description.2') }} 4 | map 5 | {{ __('exercises/4_14.description.3') }} 6 | map 7 | {{ __('exercises/4_14.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_17.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_17.description.1') }} 2 | <e3> 3 | {{ __('exercises/4_17.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_22.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_22.description.1') }} 2 | let 3 | {{ __('exercises/4_22.description.2') }} 4 | 4.6.

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_24.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_24.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_28.blade.php: -------------------------------------------------------------------------------- 1 |

2 | Eval 3 | {{ __('exercises/4_28.description.1') }} 4 | actual-value 5 | {{ __('exercises/4_28.description.2') }} 6 | eval 7 | {{ __('exercises/4_28.description.3') }} 8 | apply 9 | {{ __('exercises/4_28.description.4') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_3.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_3.description.1') }} 2 | eval 3 | {{ __('exercises/4_3.description.2') }} 4 | 2.73 5 | {{ __('exercises/4_3.description.3') }} 6 | car 7 | {{ __('exercises/4_3.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_32.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_32.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_33.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_33.description.1') }}

2 |
(car '(a b c))
3 |

{{ __('exercises/4_33.description.2') }} 4 | cons 5 | {{ __('exercises/4_33.description.3') }} 6 | car 7 | {{ __('exercises/4_33.description.4') }} 8 | cdr 9 | {{ __('exercises/4_33.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_34.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_34.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_38.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_38.description.1') }} 2 | multiple-dwelling 3 | {{ __('exercises/4_38.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_39.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_39.description.1') }} 2 | multiple-dwelling 3 | {{ __('exercises/4_39.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_40.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_40.description.1') }} 2 | let 3 | {{ __('exercises/4_40.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_41.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_41.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_43.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_43.description.1') }} 2 | amb 3 | {{ __('exercises/4_43.description.2') }} 4 |

5 |

{{ __('exercises/4_43.description.3') }}

6 |

{{ __('exercises/4_43.description.4') }}4.40 7 | {{ __('exercises/4_43.description.5') }}

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_44.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_44.description.1') }}2.42 2 | {{ __('exercises/4_44.description.2') }}

3 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_45.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_45.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_46.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_46.description.1') }} 2 | amb 3 | {{ __('exercises/4_46.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_48.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_48.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_49.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_49.description.1') }} 2 | parse-word 3 | {{ __('exercises/4_49.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_50.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_50.description.1') }} 2 | ramb 3 | {{ __('exercises/4_50.description.2') }} 4 | amb 5 | {{ __('exercises/4_50.description.3') }} 6 | 4.49

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_55.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_55.description.1') }}

2 |

{{ __('exercises/4_55.description.2') }}

3 |

{{ __('exercises/4_55.description.3') }}

4 |

{{ __('exercises/4_55.description.4') }}

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_56.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_56.description.1') }}

2 |

{{ __('exercises/4_56.description.2') }}

3 |

{{ __('exercises/4_56.description.3') }}

4 |

{{ __('exercises/4_56.description.4') }}

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_57.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_57.description.1') }}

2 |

{{ __('exercises/4_57.description.2') }}

3 |

{{ __('exercises/4_57.description.3') }}

4 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_58.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_58.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_65.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_65.description.1') }}

2 |
(wheel ?who)
 3 | 
4 |

{{ __('exercises/4_65.description.2') }}

5 |
;;; Query results:
 6 | (wheel (Warbucks Oliver))
 7 | (wheel (Bitdiddle Ben))
 8 | (wheel (Warbucks Oliver))
 9 | (wheel (Warbucks Oliver))
10 | (wheel (Warbucks Oliver))
11 | 
12 |

{{ __('exercises/4_65.description.3') }}

13 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_67.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_67.description.1') }}4.64 2 | {{ __('exercises/4_67.description.2') }}

3 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_72.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_72.description.1') }} 2 | disjoin 3 | {{ __('exercises/4_72.description.2') }} 4 | stream-flatmap 5 | {{ __('exercises/4_72.description.3') }} 6 | interleave 7 | {{ __('exercises/4_72.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_77.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_77.description.1') }} 2 | not 3 | {{ __('exercises/4_77.description.2') }} 4 | lisp-value 5 | {{ __('exercises/4_77.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_78.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_78.description.1') }} 2 | try-again 3 | {{ __('exercises/4_78.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/4_9.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/4_9.description.1') }} 2 | do 3 | {{ __('exercises/4_9.description.2') }} 4 | for 5 | {{ __('exercises/4_9.description.3') }} 6 | while 7 | {{ __('exercises/4_9.description.4') }} 8 | until 9 | {{ __('exercises/4_9.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_1.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_1.description') }}

2 |
(define (factorial n)
3 |   (define (iter product counter)
4 |     (if (> counter n)
5 |           product
6 |           (iter (* counter product)
7 |                 (+ counter 1))))
8 |   (iter 1 1))
9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_10.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_10.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_13.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_13.description.1') }} 2 | make-machine 3 | {{ __('exercises/5_13.description.2') }} 4 | make-machine 5 | {{ __('exercises/5_13.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_15.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_15.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_16.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_16.description.1') }} 2 | trace-on 3 | {{ __('exercises/5_16.description.2') }} 4 | trace-off 5 | {{ __('exercises/5_16.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_17.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_17.description.1') }}5.16 2 | {{ __('exercises/5_17.description.2') }}5.15 3 | {{ __('exercises/5_17.description.3') }}

4 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_18.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_18.description.1') }} 2 | make-register 3 | {{ __('exercises/5_18.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_2.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_2.description') }}5.1

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_22.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_22.description.1') }}3.12 2 | {{ __('exercises/5_22.description.2') }} 3 | append 4 | {{ __('exercises/5_22.description.3') }} 5 | append! 6 | {{ __('exercises/5_22.description.4') }} 7 |

8 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_23.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_23.description.1') }} 2 | cond 3 | {{ __('exercises/5_23.description.2') }} 4 | let 5 | {{ __('exercises/5_23.description.3') }} 6 | cond->if 7 | {{ __('exercises/5_23.description.4') }} 8 |

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_24.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_24.description.1') }} 2 | cond 3 | {{ __('exercises/5_24.description.2') }} 4 | if 5 | {{ __('exercises/5_24.description.3') }} 6 | cond 7 | {{ __('exercises/5_24.description.4') }} 8 | ev-sequence 9 | {{ __('exercises/5_24.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_25.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_25.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_32.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_32.description.1') }} 2 | preserving 3 | {{ __('exercises/5_32.description.2') }} 4 | env 5 | {{ __('exercises/5_32.description.3') }} 6 |

7 |

{{ __('exercises/5_32.description.4') }}

8 |

{{ __('exercises/5_32.description.5') }}

9 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_33.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_33.description.1') }}

2 |
(define (factorial-alt n)
 3 |   (if (= n 1)
 4 |       1
 5 |       (* n (factorial-alt (- n 1)))))
 6 | 
7 |

{{ __('exercises/5_33.description.2') }} 8 | factorial 9 | {{ __('exercises/5_33.description.3') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_36.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_36.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_39.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_39.description.1') }} 2 | lexical-address-lookup 3 | {{ __('exercises/5_39.description.2') }} 4 | Lexical-address-lookup 5 | {{ __('exercises/5_39.description.3') }} 6 | *unassigned* 7 | {{ __('exercises/5_39.description.4') }} 8 | lexical-address-set! 9 | {{ __('exercises/5_39.description.5') }} 10 |

11 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_40.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_40.description.1') }} 2 | compile 3 | {{ __('exercises/5_40.description.2') }} 4 | compile-lambda-body 5 | {{ __('exercises/5_40.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_49.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_49.description.1') }} 2 | compile 3 | {{ __('exercises/5_49.description.2') }} 4 | assemble 5 | {{ __('exercises/5_49.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_5.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_5.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_50.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_50.description.1') }} 2 | begin 3 | {{ __('exercises/5_50.description.2') }} 4 |

5 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_51.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_51.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_52.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_52.description.1') }}5.51 2 | {{ __('exercises/5_52.description.2') }}

3 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_6.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_6.description.1') }} 2 | save 3 | {{ __('exercises/5_6.description.2') }} 4 | restore 5 | {{ __('exercises/5_6.description.3') }} 6 |

7 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_7.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_7.description') }}5.4

2 | -------------------------------------------------------------------------------- /resources/views/exercise/listing/5_9.blade.php: -------------------------------------------------------------------------------- 1 |

{{ __('exercises/5_9.description') }}

2 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_sandbox_wrapper.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket 2 | (require racket/sandbox) 3 | 4 | (define base-module-eval 5 | (make-module-evaluator '(module m racket/base 6 | (require rackunit) 7 | ;;; BEGIN 8 | {!! $solution !!} 9 | ;;; END 10 | {!! $tests !!} 11 | ) 12 | ) 13 | ) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_11.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (f 4) 11) 9 | (check-equal? (f-iter 4) 11) 10 | (check-equal? (f 3) 4) 11 | (check-equal? (f-iter 1) 1) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_11_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (f x) 2 | (if (< x 3) 3 | x 4 | (+ (f (- x 1)) (* 2 (f (- x 2))) (* 3 (f (- x 3)))))) 5 | 6 | (define (f-iter x) 7 | (define (iter-step a b c count) 8 | (if (= count 0) 9 | c 10 | (iter-step (+ a (* 2 b) (* 3 c)) a b (- count 1)))) 11 | (if (< x 3) 12 | x 13 | (iter-step 2 1 0 x))) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_12.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (solution 1 1) 1) 9 | (check-equal? (solution 3 2) 2) 10 | (check-equal? (solution 4 3) 3) 11 | (check-equal? (solution 5 2) 4) 12 | (check-equal? (solution 5 3) 6) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_12_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (solution row col) 2 | (cond (( = col 1) 1) 3 | (( = col row) 1) 4 | (( > col row) 0) 5 | ((+ 6 | (solution (- row 1) (- col 1)) 7 | (solution (- row 1) col) 8 | )) 9 | ) 10 | ) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_16.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (solution 10 0) 1) 9 | (check-equal? (solution 3 20) (expt 3 20)) 10 | (check-equal? (solution 2 10) (expt 2 10)) 11 | (check-equal? (solution 0 5) 0) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_16_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (square x) (* x x)) 2 | 3 | (define (solution b n) 4 | (define (iter N B A) 5 | (cond ((= 0 N) A) 6 | ((even? N) (iter (/ N 2) (square B) A)) 7 | (else (iter (- N 1) B (* B A))))) 8 | (iter n b 1)) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_17.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (fast-mul 1 1) 1) 9 | (check-equal? (fast-mul 40 30) (* 40 30)) 10 | (check-equal? (fast-mul 5 0) 0) 11 | (check-equal? (fast-mul 5 15) (* 5 15)) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_17_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (double n) 2 | (+ n n)) 3 | 4 | (define (halve n) 5 | (/ n 2)) 6 | 7 | (define (fast-mul a b) 8 | (cond ((= b 0) 9 | 0) 10 | ((even? b) 11 | (double (fast-mul a (halve b)))) 12 | ((odd? b) 13 | (+ a (fast-mul a (- b 1)))))) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_18.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (mul-iter 1 1) 1) 9 | (check-equal? (mul-iter 40 30) (* 40 30)) 10 | (check-equal? (mul-iter 5 0) 0) 11 | (check-equal? (mul-iter 5 15) (* 5 15)) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_19.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (fib 1) 1) 9 | (check-equal? (fib 2) 1) 10 | (check-equal? (fib 7) 13) 11 | (check-equal? (fib 8) 21) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_22_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (search-for-primes lower upper op) 2 | (define (iter n) 3 | (cond ((<= n upper) (timed-prime-test n op) (iter (+ n 2))))) 4 | (iter (if (odd? lower) lower (+ lower 1)))) 5 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_23.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (next 2) 3) 9 | (check-equal? (next 3) 5) 10 | (check-equal? (next 4) 6) 11 | (check-equal? (smallest-divisor 4) 2) 12 | (check-equal? (smallest-divisor 21) 3) 13 | (check-equal? (smallest-divisor 1999) 1999) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_29.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (cube x) (* x x x)) 9 | 10 | (check-equal? (round (* 100 (simpson cube 0 1 100))) 25.0) 11 | (check-equal? (round (* 100 (simpson cube 0 1 1000))) 25.0) 12 | (check-equal? (floor (* 1000 (simpson cube 0 1 100))) 249.0) 13 | (check-equal? (floor (* 1000 (simpson cube 0 1 1000))) 250.0) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_3.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (solution 1 2 3) 13) 9 | (check-equal? (solution 4 2 3) 25) 10 | (check-equal? (solution 0 0 0) 0) 11 | (check-equal? (solution 1 0 1) 2) 12 | (check-equal? (solution 2 3 2) 13) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_30.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (inc n) (+ n 1)) 9 | 10 | (define (cube x) (* x x x)) 11 | 12 | (define (identity x) x) 13 | 14 | (check-equal? (sum cube 0 inc 2) 9) 15 | (check-equal? (sum cube 1 inc 10) 3025) 16 | (check-equal? (sum identity 1 inc 10) 55) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_30_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (sum term a next b) 2 | (define (iter a result) 3 | (if (> a b) 4 | result 5 | (iter (next a) (+ result (term a))))) 6 | (iter a 0)) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_31.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (inc n) (+ n 1)) 9 | 10 | (define (square x) (* x x)) 11 | 12 | (define (identity x) x) 13 | 14 | (check-equal? (product square 1 inc 3) 36) 15 | (check-equal? (product identity 3 inc 5) 60) 16 | (check-equal? (factorial 5) 120) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_31_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (next x) (+ x 1)) 2 | 3 | (define (product term a next b) 4 | (if (> a b) 1 5 | (* (term a) (product term (next a) next b)))) 6 | 7 | (define (factorial n) 8 | (product identity 1 next n)) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_32.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (inc n) (+ n 1)) 9 | 10 | (define (square x) (* x x)) 11 | 12 | (define (identity x) x) 13 | 14 | (check-equal? (accumulate * 1 square 1 inc 3) 36) 15 | (check-equal? (accumulate * 1 identity 3 inc 5) 60) 16 | (check-equal? (accumulate + 0 identity 1 inc 10) 55) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_32_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (accumulate combiner null-value term a next b) 2 | (define (iter a res) 3 | (if (> a b) res 4 | (iter (next a) (combiner res (term a))))) 5 | (iter a null-value)) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_33_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (filtered-accumulate combiner null-value term a next b filter) 2 | (define (iter a result) 3 | (cond ((> a b) result) 4 | ((filter a) (iter (next a) (combiner result (term a)))) 5 | (else (iter (next a) result)))) 6 | (iter a null-value)) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_35_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (solution x) (+ 1 (/ 1 x))) 2 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_36.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (round (* 100 (fixed-point cos 1.0))) 74.0) 9 | (check-equal? (round (* 100 (fixed-point (lambda (y) (+ (sin y) (cos y))) 1.0))) 126.0) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_36_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define tolerance 0.00001) 2 | 3 | (define (fixed-point f first-guess) 4 | (define (close-enough? v1 v2) 5 | (< (abs (- v1 v2)) tolerance)) 6 | (define (try guess) 7 | (display guess) 8 | (newline) 9 | (let ((next (f guess))) 10 | (if (close-enough? guess next) 11 | next 12 | (try next)))) 13 | (try first-guess)) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_37.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (test k) 9 | (cont-frac (lambda (i) 1.0) 10 | (lambda (i) 1.0) 11 | k)) 12 | 13 | 14 | (check-equal? (round (* 1000 (test 100))) 618.0) 15 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_37_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (cont-frac n d k) 2 | (define (iter index) 3 | (if (> index k) 4 | 0 5 | (/ (n index) (+ (d index) (iter (+ index 1)))))) 6 | (iter 1)) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_38.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (round (* 1000000000000 (e 100))) 2718281828459.0) 9 | (check-equal? (round (* 100000 (e 10))) 271828.0) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_38_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (cont-frac n d k) 2 | (define (iter index) 3 | (if (> index k) 4 | 0 5 | (/ (n index) (+ (d index) (iter (+ index 1)))))) 6 | (iter 1)) 7 | 8 | (define (e k) 9 | (define (N i) 1) 10 | (define (D i) 11 | (if (= 0 (remainder (+ i 1) 3)) 12 | (* 2 (/ (+ i 1) 3)) 13 | 1)) 14 | (+ 2.0 15 | (cont-frac N D k))) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_39.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define pi 3.141592653589793) 9 | 10 | (check-equal? (tan-cf (/ pi 4) 100) 1.0) 11 | (check-equal? (tan-cf 0 10) 0) 12 | (check-equal? (round (* 100 (tan-cf (/ pi 3) 100))) 173.0) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_3_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (sqr x) (* x x)) 2 | 3 | (define (sum-of-squares x y) 4 | (+ (sqr x) (sqr y))) 5 | 6 | (define (solution a b c) 7 | (if (>= a b) 8 | (if (> b c) 9 | (sum-of-squares a b) 10 | (sum-of-squares a c)) 11 | (if (> a c) 12 | (sum-of-squares a b) 13 | (sum-of-squares b c)))) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_40_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (cube x) (* x x x)) 2 | 3 | (define (square x) (* x x)) 4 | 5 | (define (cubic a b c) 6 | (lambda (x) 7 | (+ (cube x) 8 | (* a (square x)) 9 | (* b x) 10 | c))) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_41.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (inc x) 9 | (+ x 1)) 10 | 11 | (define (square x) 12 | (* x x)) 13 | 14 | (check-equal? (((double (double double)) inc) 5) 21) 15 | (check-equal? ((double inc) 6) 8) 16 | (check-equal? ((double square) 3) 81) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_41_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (double f) 2 | (lambda (x) (f (f x)))) 3 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_42.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (inc x) 9 | (+ x 1)) 10 | 11 | (define (square x) 12 | (* x x)) 13 | 14 | (define (double x) 15 | (* x 2)) 16 | 17 | (check-equal? ((compose square inc) 6) 49) 18 | (check-equal? ((compose inc double) 6) 13) 19 | (check-equal? ((compose double inc) 6) 14) 20 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_42_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (compose f g) 2 | (lambda (y) (f (g y)))) 3 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_43.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (square x) 9 | (* x x)) 10 | 11 | (define (inc x) 12 | (+ x 1)) 13 | 14 | (check-equal? ((repeated square 1) 6) 36) 15 | (check-equal? ((repeated square 2) 5) 625) 16 | (check-equal? ((repeated inc 10) 10) 20) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_43_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (compose f g) 2 | (lambda (y) (f (g y)))) 3 | 4 | (define (repeated f x) 5 | (lambda (y) ((repeated-iter f f x) y))) 6 | 7 | (define (repeated-iter f g x) 8 | (cond ((= x 1) f) 9 | ((> x 1) (repeated-iter (compose f g) g (- x 1))))) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_44.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (square x) 9 | (* x x)) 10 | 11 | (define (cube x) 12 | (* x x x)) 13 | 14 | (check-equal? (round ((smooth square) 3)) 9.0) 15 | (check-equal? (round ((smooth cube) 10)) 1000.0) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_44_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define dx 0.00001) 2 | 3 | (define (smooth f) 4 | (lambda (x) 5 | (/ 6 | (+ (f x) 7 | (f (- x dx)) 8 | (f (+ x dx))) 9 | 3))) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_45.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (root3 x) ((nth-root 3) x)) 9 | 10 | (define (root4 x) ((nth-root 4) x)) 11 | 12 | 13 | (check-equal? (round (root3 27)) 3.0) 14 | (check-equal? (round (root3 64)) 4.0) 15 | (check-equal? (round (root4 81)) 3.0) 16 | (check-equal? (round (root4 10000)) 10.0) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_46_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (iterative-improve close-enough? improve) 2 | (lambda (first-guess) 3 | (define (try guess) 4 | (let ((next (improve guess))) 5 | (if (close-enough? guess next) 6 | next 7 | (try next)))) 8 | (try first-guess))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/1_8.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (round (* 1000 (cube-root 8.0))) 2000.0) 9 | (check-equal? (round (* 1000 (cube-root 1000.0))) 10000.0) 10 | (check-equal? (round (* 1000 (cube-root 1000000000.0))) 1000000.0) 11 | (check-equal? (round (* 1000 (cube-root 0.008))) 200.0) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_1.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (make-rat 1 2) '(1 . 2)) 9 | (check-equal? (make-rat (- 1) 2) '(-1 . 2)) 10 | (check-equal? (make-rat (- 1) (- 2)) '(1 . 2)) 11 | (check-equal? (make-rat 1 (- 2)) '(-1 . 2)) 12 | (check-equal? (make-rat 2 4) '(1 . 2)) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_10_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (div-interval x y) 2 | (if (and (<= (lower-bound y) 0) 3 | (>= (upper-bound y) 0)) 4 | (error "division by zero") 5 | (mul-interval 6 | x 7 | (make-interval (/ 1.0 (upper-bound y)) 8 | (/ 1.0 (lower-bound y)))))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_12_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-center-percent c p) 2 | (let ((width (abs (* (/ p 100) c)))) 3 | (make-interval (- c width) (+ c width)))) 4 | 5 | (define (percent i) 6 | (if (= (center i) 0) 7 | 0 8 | (* 100 (abs (/ (- (upper-bound i) (center i)) (center i)))))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_17.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | (define nil '()) 8 | 9 | (check-equal? (last-pair (list 1 2 3 4)) 4) 10 | (check-equal? (last-pair '(4 8 12 16 1)) 1) 11 | (check-equal? (last-pair (list 23 72 149 34)) 34) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_17_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (last-pair lst) 2 | (if (null? lst) 3 | nil 4 | (if (null? (cdr lst)) 5 | (car lst) 6 | (last-pair (cdr lst))))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_18.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (reverse (list 1)) (list 1)) 9 | (check-equal? (reverse (list 2 4 6 9)) (list 9 6 4 2)) 10 | (check-equal? (reverse (list 1 4 9 16 25)) '(25 16 9 4 1)) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_18_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (reverse x) 2 | (reverse-iter x '())) 3 | 4 | (define (reverse-iter x y) 5 | (if (null? x) 6 | y 7 | (reverse-iter (cdr x) (cons (car x) y)))) 8 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_19_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (first-denomination denominations) (car denominations)) 2 | 3 | (define (except-first-denomination denominations) (cdr denominations)) 4 | 5 | (define (no-more? denominations) (null? denominations)) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_1_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (gcd a b) 2 | (if (= b 0) 3 | a 4 | (gcd b (remainder a b)))) 5 | 6 | (define (normalize n d) 7 | (let ((g (abs(gcd n d)))) 8 | (cons (/ n g) (/ d g)))) 9 | 10 | (define (make-rat n d) 11 | (cond ((< d 0) (normalize (- n) (- d))) 12 | ((normalize n d)))) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_20.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (same-parity 1 2 3 4 5 6 7) '(1 3 5 7)) 9 | (check-equal? (same-parity 2 3 4 5 6 7) '(2 4 6)) 10 | (check-equal? (same-parity 1) '(1)) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_21.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define test-list (list 3 5 7 8 21 4)) 9 | (define nil '()) 10 | 11 | (check-equal? (square-list (list 1 2 3 4)) (list 1 4 9 16)) 12 | (check-equal? (square-list test-list) (square-list2 test-list)) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_21_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (square x) 2 | (* x x)) 3 | 4 | (define (square-list items) 5 | (if (null? items) 6 | '() 7 | (cons (square (car items)) (square-list (cdr items))))) 8 | 9 | (define (square-list2 items) 10 | (map square items)) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_23_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (my-for-each proc items) 2 | (let ((items-cdr (cdr items))) 3 | (proc (car items)) 4 | (if (not (null? items-cdr)) 5 | (for-each proc items-cdr) 6 | #t))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_27.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define x (list (list 1 2) (list 3 4))) 9 | (define y '((1 2)(3 4)(5 6))) 10 | 11 | (check-equal? (deep-reverse x) (list (list 4 3) (list 2 1))) 12 | (check-equal? (deep-reverse y) '((6 5)(4 3)(2 1))) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_28.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define x (list (list 1 2) (list 3 4))) 9 | (define y (list x x)) 10 | 11 | (check-equal? (fringe x) (list 1 2 3 4)) 12 | (check-equal? (fringe y) '(1 2 3 4 1 2 3 4)) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_28_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (fringe tree) 2 | (cond ((null? tree) '()) 3 | ((not (pair? tree)) (list tree)) 4 | (else (append (fringe (car tree)) 5 | (fringe (cdr tree)))))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_3.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (make-point x y) 9 | (cons x y)) 10 | 11 | (define start-point (make-point 0 0)) 12 | 13 | (define rectangle (make-rectangle start-point 2 3)) 14 | 15 | (check-equal? (rectangle-square rectangle) 6) 16 | (check-equal? (rectangle-perimeter rectangle) 10) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_30.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define tree (list 1 (list 2 (list 3 4) 5) (list 6 7))) 9 | 10 | (check-equal? (square-tree tree) '(1 (4 (9 16) 25) (36 49))) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_30_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (square-tree tree) 2 | (cond ((null? tree) '()) 3 | ((not (pair? tree)) (* tree tree)) 4 | (else (cons (square-tree (car tree)) 5 | (square-tree (cdr tree)))))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_31.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (square x) (* x x)) 9 | 10 | (define (square-tree tree) (tree-map square tree)) 11 | 12 | (define tree (list 1 (list 2 (list 3 4) 5) (list 6 7))) 13 | 14 | (check-equal? (square-tree tree) '(1 (4 (9 16) 25) (36 49))) 15 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_31_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (tree-map func tree) 2 | (cond ((null? tree) '()) 3 | ((not (pair? tree)) (func tree)) 4 | (else (cons (tree-map func (car tree)) 5 | (tree-map func (cdr tree)))))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_32.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define l (list 1 2 3)) 9 | (define nil '()) 10 | 11 | (check-equal? (subsets l) '(() (3) (2) (2 3) (1) (1 3) (1 2) (1 2 3))) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_32_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (subsets s) 2 | (if (null? s) 3 | (list '()) 4 | (let ((rest (subsets (cdr s)))) 5 | (append rest (map (lambda (x) (cons (car s) x)) rest))))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_33.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define nil '()) 9 | (define (square x) (* x x)) 10 | 11 | (define x '(1 2 3)) 12 | 13 | (check-equal? (map square x) '(1 4 9)) 14 | (check-equal? (append x (list 4 5)) (list 1 2 3 4 5)) 15 | (check-equal? (length '()) 0) 16 | (check-equal? (length x) 3) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_34.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | 9 | (check-equal? (horner-eval 1 (list 1 3 0 5 0 1)) 10) 10 | (check-equal? (horner-eval 2 (list 1 3 0 5 0 1)) 79) 11 | (check-equal? (horner-eval 2 (list 1 3 1 5 0 1)) 83) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_34_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (accumulate op initial sequence) 2 | (if (null? sequence) 3 | initial 4 | (op (car sequence) 5 | (accumulate op initial (cdr sequence))))) 6 | 7 | (define (horner-eval x coefficient-sequences) 8 | (accumulate (lambda (this-coeff higher-terms) (+ this-coeff (* x higher-terms))) 9 | 0 10 | coefficient-sequences)) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_35.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define x (cons (list 1 2) (list 3 4))) 9 | 10 | 11 | (check-equal? (count-leaves (list 1 2 (list 3 (list 4 5)))) 5) 12 | (check-equal? (count-leaves (list x x)) 8) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_36_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (accumulate op initial sequence) 2 | (if (null? sequence) 3 | initial 4 | (op (car sequence) 5 | (accumulate op initial (cdr sequence))))) 6 | 7 | (define (accumulate-n op init seqs) 8 | (if (null? (car seqs)) 9 | '() 10 | (cons (accumulate op init (map car seqs)) 11 | (accumulate-n op init (map cdr seqs))))) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_39.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define nil '()) 9 | (define example (list 1 2 3 4 5)) 10 | 11 | (check-equal? (reverse-right example) (list 5 4 3 2 1)) 12 | (check-equal? (reverse-left example) (reverse-right example)) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_4.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (cons x y) 9 | (lambda (m) (m x y))) 10 | 11 | (define (car z) 12 | (z (lambda (p q) p))) 13 | 14 | (define example (cons 1 2)) 15 | 16 | (check-equal? (car example) 1) 17 | (check-equal? (cdr example) 2) 18 | (check-equal? (cdr (cons 5 15)) 15) 19 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_40.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (unique-pairs 2) '((2 1))) 9 | (check-equal? (length (unique-pairs 2)) 1) 10 | (check-equal? (length (unique-pairs 3)) 3) 11 | (check-equal? (length (unique-pairs 6)) 15) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_41.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (make-triple-sum 4 6) '((3 2 1))) 9 | (check-equal? (make-triple-sum 3 6) '((3 2 1))) 10 | (check-equal? (length (make-triple-sum 9 9)) 3) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_47_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (origin-list f) (car f)) 2 | (define (edge1-list f) (cadr f)) 3 | (define (edge2-list f) (caddr f)) 4 | 5 | (define (origin-cons f) (car f)) 6 | (define (edge1-cons f) (cadr f)) 7 | (define (edge2-cons f) (cddr f)) 8 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_48.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define vect1 (make-vect 1.0 2.5)) 9 | (define vect2 (make-vect 0.0 5.0)) 10 | 11 | (define segment (make-segment vect1 vect2)) 12 | 13 | (check-equal? (start-segment segment) vect1) 14 | (check-equal? (end-segment segment) vect2) 15 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_48_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-vect x y) 2 | (cons x y)) 3 | 4 | (define (make-segment start end) 5 | (cons start end)) 6 | 7 | (define (start-segment segment) 8 | (car segment)) 9 | 10 | (define (end-segment segment) 11 | (cdr segment)) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_4_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (cdr z) 2 | (z (lambda (p q) q))) 3 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_54.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (check-equal? (equal? '(this is a list) '(this is a list)) #t) 9 | (check-equal? (equal? '(this is a list) '(this (is a) list)) #f) 10 | 11 | (check-equal? (equal-proc? '(this is a list) '(this is a list)) #t) 12 | (check-equal? (equal-proc? '(this is a list) '(this (is a) list)) #f) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_54_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (equal-proc? list1 list2) 2 | (cond ((and (not (pair? list1)) (not (pair? list2))) 3 | (eq? list1 list2)) 4 | ((and (pair? list1) (pair? list2)) 5 | (and (equal-proc? (car list1) (car list2)) (equal-proc? (cdr list1) (cdr list2)))) 6 | (else #f))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_57.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | 9 | (check-equal? (deriv '(* x y) 'x) 'y) 10 | (check-equal? (deriv '(* x y (+ x 3)) 'x) '(+ (* x y) (* y (+ x 3)))) 11 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_58.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | 9 | (check-equal? (deriv '(x * 2) 'x) 2) 10 | (check-equal? (deriv '(x * y) 'x) 'y) 11 | (check-equal? (deriv '(2 * x + y) 'x) 2) 12 | (check-equal? (deriv '((2 * x) + (3 * x) + 1) 'x) 5) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_5_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (inc x) (+ x 1)) 2 | 3 | (define (cons a b) 4 | (* (expt 2 a ) 5 | (expt 3 b))) 6 | 7 | (define (car z) 8 | (if (= (remainder z 2) 0) 9 | (inc (car (/ z 2))) 10 | 0)) 11 | 12 | (define (cdr z) 13 | (if (= (remainder z 3) 0) 14 | (inc (cdr (/ z 3))) 15 | 0)) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_60.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define first '(1 2 3 5 3)) 9 | (define second '(3 4 5 6 5)) 10 | 11 | (check-equal? (union-set first second) '(5 6 5 4 3 1 2 3 5 3)) 12 | (check-equal? (intersection-set first second) '(3 5 3)) 13 | (check-equal? (intersection-set second first) '(3 5 5)) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_61.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define x (adjoin-set 2 '())) 9 | (define y (adjoin-set 0 x)) 10 | (define z (adjoin-set 1 y)) 11 | (define q (adjoin-set 1 z)) 12 | 13 | (check-equal? z q) 14 | (check-equal? (adjoin-set 1 (adjoin-set 0 (adjoin-set 2 '()))) 15 | (adjoin-set 1 (adjoin-set 2 (adjoin-set 0 '())))) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_62.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define x '(1 3 5 8)) 9 | (define y '(0 1 2 4 9)) 10 | 11 | (check-equal? (union-set x y) '(0 1 2 3 4 5 8 9)) 12 | (check-equal? (union-set x y) (union-set y x)) 13 | (check-equal? (union-set '() y) y) 14 | (check-equal? (union-set x '()) x) 15 | (check-equal? (union-set x x) x) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_69_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (successive-merge leaves) 2 | (if (null? (cdr leaves)) 3 | (car leaves) 4 | (successive-merge 5 | (adjoin-set (make-code-tree (car leaves) (cadr leaves)) 6 | (cddr leaves))))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_6_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define one (lambda (f) (lambda (x) (f x)))) 2 | 3 | (define two (lambda (f) (lambda (x) (f (f x))))) 4 | 5 | (define (add a b) 6 | (lambda (f) 7 | (lambda (x) 8 | ((a f) ((b f) x))))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_7.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define (make-interval a b) 9 | (cons a b)) 10 | 11 | (define lower 5) 12 | 13 | (define upper 10) 14 | 15 | (define interval (make-interval lower upper)) 16 | 17 | (check-equal? (lower-bound interval) lower) 18 | (check-equal? (upper-bound interval) upper) 19 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_75_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-from-mag-ang mag ang) 2 | (define (dispatch op) 3 | (cond ((eq? op 'real-part) (* mag (cos ang))) 4 | ((eq? op 'imag-part) (* mag (sin ang))) 5 | ((eq? op 'magnitude) mag) 6 | ((eq? op 'angle) ang) 7 | (else (error "Unknown op -- MAKE-FROM-MAG-ANG" op)))) 8 | dispatch) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_7_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (lower-bound interval) 2 | (car interval)) 3 | 4 | (define (upper-bound interval) 5 | (cdr interval)) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_8_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (upper-bound interval) (max (car interval) (cdr interval))) 2 | 3 | (define (lower-bound interval) (min (car interval) (cdr interval))) 4 | 5 | (define (sub-interval a b) 6 | (make-interval (- (lower-bound a) (upper-bound b)) 7 | (- (upper-bound a) (lower-bound b)))) 8 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/2_9_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (width interval) 2 | (/ (abs (- (lower-bound interval) 3 | (upper-bound interval) 4 | )) 5 | 2)) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_1.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define A (make-accumulator 5)) 9 | 10 | (check-equal? (A 10) 15) 11 | (check-equal? (A 10) 25) 12 | (check-equal? (A -5) 20) 13 | (check-equal? ((make-accumulator 0) 5) 5) 14 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_17_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (count-pairs x) 2 | (let ((encountered '())) 3 | (define (helper x) 4 | (if (or (not (pair? x)) (memq x encountered)) 5 | 0 6 | (begin 7 | (set! encountered (cons x encountered)) 8 | (+ (helper (car x)) 9 | (helper (cdr x)) 10 | 1)))) 11 | (helper x))) 12 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_18_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (cycle? x) 2 | (let ((traversed '())) 3 | (define (traverse x) 4 | (cond ((null? x) #f) 5 | ((memq x traversed) #t) 6 | (else (set! traversed (cons x traversed)) 7 | (traverse (cdr x))))) 8 | (traverse x))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_1_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-accumulator start) 2 | (let ((acc start)) 3 | (lambda (amount) 4 | (set! acc (+ acc amount)) 5 | acc))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_2.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define s (make-monitored sqrt)) 9 | 10 | (check-equal? (s 100) 10) 11 | (check-equal? (s 25) 5) 12 | (check-equal? (s 'how-many-calls?) 2) 13 | (check-equal? (s 'reset-count) 0) 14 | (check-equal? (s 100) 10) 15 | (check-equal? (s 'how-many-calls?) 1) 16 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_21_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (print-queue q op) 2 | (display (mcar q) op)) 3 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_29_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (or-gate a1 a2 output) 2 | (let ((c1 (make-wire)) 3 | (c2 (make-wire)) 4 | (c3 (make-wire))) 5 | (inverter a1 c1) 6 | (inverter a2 c2) 7 | (and-gate c1 c2 c3) 8 | (inverter c3 output))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_2_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-monitored f) 2 | (let ((acc 0)) 3 | (lambda (arg) 4 | (cond ((eq? arg 'how-many-calls?) acc) 5 | ((eq? arg 'reset-count) 6 | (begin (set! acc 0) acc)) 7 | (else 8 | (begin (set! acc (+ acc 1)) 9 | (f arg))))))) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_30_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (ripple-carry-adder a b s c) 2 | (let ((c-in (make-wire))) 3 | (if (null? (cdr a)) 4 | (set-signal! c-in 0) 5 | (ripple-carry-adder (cdr a) (cdr b) (cdr s) c-in)) 6 | (full-adder (car a) (car b) c-in (car s) c))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_33_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (averager a b c) 2 | (let ((u (make-connector)) 3 | (v (make-connector))) 4 | (adder a b u) 5 | (multiplier c v u) 6 | (constant 2 v) 7 | 'ok)) 8 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_50_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (stream-map proc . argstreams) 2 | (if (stream-null? (car argstreams)) 3 | the-empty-stream 4 | (cons-stream 5 | (apply proc (map stream-car argstreams)) 6 | (apply stream-map 7 | (cons proc (map stream-cdr argstreams)))))) 8 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_54_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (mul-streams s1 s2) 2 | (stream-map * s1 s2)) 3 | 4 | (define factorials 5 | (cons-stream 1 6 | (mul-streams factorials (stream-cdr integers)))) 7 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_55_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (partial-sums s) 2 | (add-streams s (cons-stream 0 (partial-sums s)))) 3 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_56_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define S 2 | (cons-stream 1 (merge 3 | (scale-stream S 2) 4 | (merge (scale-stream S 3) 5 | (scale-stream S 5))))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_59_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (integrate-series s) 2 | (stream-map / s integers)) 3 | 4 | (define sine-series 5 | (cons-stream 0 (integrate-series cosine-series))) 6 | 7 | (define cosine-series 8 | (cons-stream 1 (integrate-series (scale-stream sine-series -1)))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_64_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (stream-limit stream tolerance) 2 | (if (< (abs (- (stream-ref stream 1) (stream-ref stream 0))) tolerance) 3 | (stream-ref stream 1) 4 | (stream-limit (stream-cdr stream) tolerance))) 5 | 6 | (define (stream-ref s n) 7 | (if (= n 0) 8 | (stream-car s) 9 | (stream-ref (stream-cdr s) (- n 1)))) 10 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_65_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (ln2-sequence n) 2 | (cons-stream (/ 1.0 n) 3 | (stream-map - (ln2-sequence (+ n 1))))) 4 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_71.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | 5 | ;;; BEGIN 6 | {!! $solution !!} 7 | ;;; END 8 | 9 | (require racket) 10 | 11 | (check-equal? (stream-first ramanujan-numbers) 1729) 12 | (check-equal? (stream-first (stream-rest ramanujan-numbers)) 4104) 13 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_73_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (RC r c dt) 2 | (lambda (si initial-voltage) 3 | (add-streams (scale-stream si r) 4 | (integral (scale-stream si (/ 1 c)) initial-voltage dt)))) 5 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_74_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (sign-change-detector old new) 2 | (cond ((or (positive? old) (zero? old)) 3 | (if (negative? new) -1 0)) 4 | ((negative? old) 5 | (if (negative? new) 0 1)))) 6 | 7 | (define zero-crossings 8 | (stream-map sign-change-detector sense-data (cons-stream 0 sense-data))) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_76_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (average x y) 2 | (/ (+ x y) 2)) 3 | 4 | (define (smooth input-stream) 5 | (stream-map average input-stream (stream-cdr input-stream))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_7_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-joint acc acc-pass new-pass) 2 | (define (dispatch key m) 3 | (cond ((eq? key new-pass) (acc acc-pass m)) 4 | (else (error "Wrong password")))) 5 | dispatch) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_8.blade.php: -------------------------------------------------------------------------------- 1 | #lang racket/base 2 | (require rackunit) 3 | 4 | ;;; BEGIN 5 | {!! $solution !!} 6 | ;;; END 7 | 8 | (define f (make-f)) 9 | 10 | (define left f) 11 | 12 | (check-equal? (+ (left 0) (left 1)) 0) 13 | 14 | (define right (make-f)) 15 | 16 | (check-equal? (+ (right 1) (right 0)) 1) 17 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_82_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (randoms-ranged low high) 2 | (cons-stream (random-in-range low high) 3 | (randoms-ranged low high))) 4 | 5 | (define (estimate-integral P x1 x2 y1 y2) 6 | (define point-in-integral-stream 7 | (stream-map P (randoms-ranged x1 x2) (randoms-ranged y1 y2))) 8 | (monte-carlo point-in-integral-stream 0 0)) 9 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/3_8_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (make-f) 2 | (let ((count 1)) 3 | (lambda (x) 4 | (set! count (* count x)) 5 | count))) 6 | -------------------------------------------------------------------------------- /resources/views/exercise/solution_stub/4_6_solution.blade.php: -------------------------------------------------------------------------------- 1 | (define (let-vars expr) (map car (cadr expr))) 2 | 3 | (define (let-inits expr) (map cadr (cadr expr))) 4 | 5 | (define (let-body expr) (cddr expr)) 6 | 7 | (define (let->combination expr) 8 | (list (make-lambda (let-vars expr) (let-body expr)) 9 | (let-inits expr))) 10 | -------------------------------------------------------------------------------- /resources/views/layouts/deps/_gtm_body.blade.php: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /resources/views/rating/_menu.blade.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/ControllerTestCase.php: -------------------------------------------------------------------------------- 1 | create(); 16 | $this->user = $user; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/Feature/Http/Controllers/Rating/CommentControllerTest.php: -------------------------------------------------------------------------------- 1 | get(route('comments_top.index')) 12 | ->assertOk(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/Feature/Http/Controllers/UserCommentControllerTest.php: -------------------------------------------------------------------------------- 1 | get(route('users.comments.index', $this->user)); 12 | 13 | $response->assertOk(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/Feature/Http/Controllers/UserControllerTest.php: -------------------------------------------------------------------------------- 1 | get(route('users.show', $this->user)); 12 | 13 | $response->assertOk(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/Unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hexlet/hexlet-sicp/e62bc1ac0e0f5080ca735c156c62bffd775da547/tests/Unit/.gitkeep -------------------------------------------------------------------------------- /tests/fixtures/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /xdebug.ini: -------------------------------------------------------------------------------- 1 | zend_extension=xdebug 2 | 3 | error_reporting=E_ALL 4 | [xdebug] 5 | xdebug.mode=develop 6 | xdebug.start_with_request=yes 7 | --------------------------------------------------------------------------------