├── .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 |
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 |
{{ __('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') }}
{{ __('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 |
{{ __('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 |
{{ __('exercises/1_25.description.1') }}
2 | expmod
3 | {{ __('exercises/1_25.description.2') }}
4 |
(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') }}
{{ __('exercises/1_30.description.1') }}
2 | sum
3 | {{ __('exercises/1_30.description.2') }}
4 |
(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 |
{{ __('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 |
{{ __('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 |
(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 |
{{ __('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') }}
{{ __('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 |
{{ __('exercises/2_1.description.1') }}
2 | make-rat
3 | {{ __('exercises/2_1.description.2') }}
4 | Make-rat
5 | {{ __('exercises/2_1.description.3') }}
6 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
(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 |
(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 |
{{ __('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 |
(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 |
(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 |
(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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/2_59.description.1') }}
2 | union-set
3 | {{ __('exercises/2_59.description.2') }}
4 |
{{ __('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 |
{{ __('exercises/2_62.description.1') }}
2 | Θ(n)
3 | {{ __('exercises/2_62.description.2') }}
4 | union-set
5 | {{ __('exercises/2_62.description.3') }}
6 |
{{ __('exercises/2_66.description.1') }}
2 | lookup
3 | {{ __('exercises/2_66.description.2') }}
4 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/2_8.description.1') }}
2 | sub-interval
3 | {{ __('exercises/2_8.description.2') }}
4 |
{{ __('exercises/2_80.description.1') }}
2 | =zero?
3 | {{ __('exercises/2_80.description.2') }}
4 |
{{ __('exercises/2_82.description.1') }}
2 | apply-generic
3 | {{ __('exercises/2_82.description.2') }}
4 |
{{ __('exercises/2_83.description.1') }}
2 | raise
3 | {{ __('exercises/2_83.description.2') }}
4 |
{{ __('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 |
{{ __('exercises/2_86.description.1') }}
2 | sine
3 | {{ __('exercises/2_86.description.2') }}
4 | cosine
5 | {{ __('exercises/2_86.description.3') }}
6 |
{{ __('exercises/2_87.description.1') }}
2 | =zero?
3 | {{ __('exercises/2_87.description.2') }}
4 | adjoin-term
5 | {{ __('exercises/2_87.description.3') }}
6 |
{{ __('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 |
(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 |
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 |
2 | {{ __('exercises/3_18.description.1') }}
3 | cdr
{{ __('exercises/3_18.description.2') }}
4 | 3.13
5 | {{ __('exercises/3_18.description.3') }}
6 |
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 |
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 |
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 |
2 | {{ __('exercises/3_30.description.1') }}
3 | ripple-carry-adder
{{ __('exercises/3_30.description.2') }}
4 |
{{ __('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 |
(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 |
{{ __('exercises/3_43.description.1') }}
2 | exchange
3 | {{ __('exercises/3_43.description.2') }}
4 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/3_47.description.4') }}
8 |{{ __('exercises/3_47.description.5') }}
9 | test-and-set!
10 | {{ __('exercises/3_47.description.6') }}
11 |
{{ __('exercises/3_48.description.1') }}
2 | serialized-exchange
3 | {{ __('exercises/3_48.description.2') }}
4 | make-account
5 | {{ __('exercises/3_48.description.3') }}
6 |
{{ __('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 |
(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 |{{ __('exercises/3_65.description.2') }}
4 | 2
5 | {{ __('exercises/3_65.description.3') }}
6 | π
7 | {{ __('exercises/3_65.description.4') }}
8 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/3_82.description.1') }}3.5
2 | {{ __('exercises/3_82.description.2') }}
3 | estimate-integral
4 | {{ __('exercises/3_82.description.3') }}
5 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/4_17.description.1') }}
2 | <e3>
3 | {{ __('exercises/4_17.description.2') }}
4 |
{{ __('exercises/4_22.description.1') }}
2 | let
3 | {{ __('exercises/4_22.description.2') }}
4 | 4.6.
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/4_39.description.1') }}
2 | multiple-dwelling
3 | {{ __('exercises/4_39.description.2') }}
4 |
{{ __('exercises/4_40.description.1') }}
2 | let
3 | {{ __('exercises/4_40.description.2') }}
4 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/4_50.description.1') }}
2 | ramb
3 | {{ __('exercises/4_50.description.2') }}
4 | amb
5 | {{ __('exercises/4_50.description.3') }}
6 | 4.49
{{ __('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 |
{{ __('exercises/4_77.description.1') }}
2 | not
3 | {{ __('exercises/4_77.description.2') }}
4 | lisp-value
5 | {{ __('exercises/4_77.description.3') }}
6 |
{{ __('exercises/4_78.description.1') }}
2 | try-again
3 | {{ __('exercises/4_78.description.2') }}
4 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('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 |
{{ __('exercises/5_40.description.1') }}
2 | compile
3 | {{ __('exercises/5_40.description.2') }}
4 | compile-lambda-body
5 | {{ __('exercises/5_40.description.3') }}
6 |
{{ __('exercises/5_49.description.1') }}
2 | compile
3 | {{ __('exercises/5_49.description.2') }}
4 | assemble
5 | {{ __('exercises/5_49.description.3') }}
6 |
{{ __('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 |
{{ __('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 |
{{ __('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 |